Skip to content

Allow passing the --nocapture flag to compiletest #109407

Closed
@peter-lyons-kehl

Description

@peter-lyons-kehl
  • x test tests/mir-opt --test-args=nocapture passes
  • x test tests/mir-opt --test-args=--nocapture fails

On recent master (commit 13b7aa4), with config.toml to avoid building LLVM:

[llvm]
download-ci-llvm = false

[rust]
# With this set to true, serde (as a part of rustc) failed to compile.
debug = true
channel = "nightly"

[target.x86_64-unknown-linux-gnu]
llvm-config = "/usr/bin/llvm-config"
> x test tests/mir-opt --test-args=--nocapture
...
thread 'main' panicked at 'UnrecognizedOption("nocapture")', src/tools/compiletest/src/main.rs:168:19
...

❯ x test tests/mir-opt --test-args=nocapture
...
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 235 filtered out; finished in 0.00s

Extra spin/Side note:
Contrary to the above, with --dry-run, both --test-args=nocapture and --test-args=--nocapture pass well:
x test tests/mir-opt --test-args=nocapture --dry-run and x test tests/mir-opt --test-args=--nocapture --dry-run.

All the same when invoking with ./x.py instead of x.

Also discussed at https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20debugging.20library.2Fcore.20in.20VS.20Code.3F/near/341923600.

Metadata

Metadata

Assignees

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions