rust-lang / rust-lang/libc

ctest: Allow `crate_path` in `TestGenerator::generate_files` to be either a `Cargo.toml` or a `.rs`

Open
#5,238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ctest
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

If it is a Cargo.toml then we should just use that for the cargo rustc invocation. If it is a path to .rs, treat that as the root for a standalone crate.

Becomes relevant with https://github.com/rust-lang/libc/pull/5214.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate TestGenerator::generate_files and inspect how crate_path is currently used for the cargo rustc invocation. Compare the behavior needed for Cargo.toml and standalone .rs inputs, using the context from rust-lang/libc#5214. Done means both path forms generate the expected test files and existing tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.