Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiletest does not work with RUST_TEST_NOCAPTURE #17829

Closed
brson opened this issue Oct 6, 2014 · 0 comments
Closed

compiletest does not work with RUST_TEST_NOCAPTURE #17829

brson opened this issue Oct 6, 2014 · 0 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc

Comments

@brson
Copy link
Contributor

brson commented Oct 6, 2014

The way compiletest drives the test runner bypasses the test lib's command line parsing, which is also where the RUST_TEST_NOCAPTURE env var is checked.

@brson brson added I-wrong A-testsuite Area: The testsuite used to check the correctness of rustc labels Oct 6, 2014
bombless added a commit to bombless/rust that referenced this issue Feb 23, 2015
…ture, r=Manishearth

This is a patch for rust-lang#17829.

In `compiletest` there are multiple layers which capture the output. The first layer is  `run_tests_console` which is used to execute all tests.

Then there are some tests that contain unit tests, which by default also captures output. Therefore `compiletest` adds `RUST_TEST_NOCAPTURE` (and `RUST_TEST_TASKS` for completeness) to the run environment of the task.

Finally, the task used to execute a test redirects stdout and stdin. At the moment, the `VERBOSE=1` prints all captured output of the task (but has to print stdout and stderr separately). So at the moment using `RUST_TEST_NOCAPTURE=1` only makes sense when also using `VERBOSE=1` which seems a little bit cumbersome.

Should I update the patch to only print the output of the tasks that actually execute the test (`VERBOSE=1` includes other stuff, like the output of the task used to compile the test)? This will probably involve adding an extra flag to some functions in `src/compiletest/runtest.rs` to distinguish compilation runs from runs that execute the actual tests.
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 23, 2015
…ture, r=Manishearth

 This is a patch for rust-lang#17829.

In `compiletest` there are multiple layers which capture the output. The first layer is  `run_tests_console` which is used to execute all tests.

Then there are some tests that contain unit tests, which by default also captures output. Therefore `compiletest` adds `RUST_TEST_NOCAPTURE` (and `RUST_TEST_TASKS` for completeness) to the run environment of the task.

Finally, the task used to execute a test redirects stdout and stdin. At the moment, the `VERBOSE=1` prints all captured output of the task (but has to print stdout and stderr separately). So at the moment using `RUST_TEST_NOCAPTURE=1` only makes sense when also using `VERBOSE=1` which seems a little bit cumbersome.

Should I update the patch to only print the output of the tasks that actually execute the test (`VERBOSE=1` includes other stuff, like the output of the task used to compile the test)? This will probably involve adding an extra flag to some functions in `src/compiletest/runtest.rs` to distinguish compilation runs from runs that execute the actual tests.
lnicola pushed a commit to lnicola/rust that referenced this issue Aug 29, 2024
…ykril

fix: run flycheck without rev_deps when target is specified

Since querying for a crate's target is a call to salsa and therefore blocking, flycheck task is now deferred out of main thread by using `GlobalState`s `deferred_task_queue`. Fixes rust-lang#17829  and rust-lang/rustlings#2071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc
Projects
None yet
Development

No branches or pull requests

1 participant