diff options
| author | Ralf Jung <post@ralfj.de> | 2024-04-06 14:43:39 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-04-15 09:50:42 +0200 |
| commit | 510720e9fcb1181cc2e634fe6edddadf2d2c4993 (patch) | |
| tree | 1b0c93df0f9157b893761873415cd5c527853d14 | |
| parent | 23d47dba319331d4418827cfbb8c1af283497d3c (diff) | |
| download | rust-510720e9fcb1181cc2e634fe6edddadf2d2c4993.tar.gz rust-510720e9fcb1181cc2e634fe6edddadf2d2c4993.zip | |
libtest: also measure time in Miri
| -rw-r--r-- | library/test/src/console.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/src/utils/render_tests.rs | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/library/test/src/console.rs b/library/test/src/console.rs index f3918ba333a..7e224d60d9d 100644 --- a/library/test/src/console.rs +++ b/library/test/src/console.rs @@ -315,10 +315,8 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Resu // Prevent the usage of `Instant` in some cases: // - It's currently not supported for wasm targets. - // - We disable it for miri because it's not available when isolation is enabled. - let is_instant_unsupported = (cfg!(target_family = "wasm") && !cfg!(target_os = "wasi")) - || cfg!(target_os = "zkvm") - || cfg!(miri); + let is_instant_unsupported = + (cfg!(target_family = "wasm") && !cfg!(target_os = "wasi")) || cfg!(target_os = "zkvm"); let start_time = (!is_instant_unsupported).then(Instant::now); run_tests(opts, tests, |x| on_test_event(&x, &mut st, &mut *out))?; diff --git a/src/bootstrap/src/utils/render_tests.rs b/src/bootstrap/src/utils/render_tests.rs index 95cd55c9a3d..16e0c2ac185 100644 --- a/src/bootstrap/src/utils/render_tests.rs +++ b/src/bootstrap/src/utils/render_tests.rs @@ -377,7 +377,7 @@ struct SuiteOutcome { measured: usize, filtered_out: usize, /// The time it took to execute this test suite, or `None` if time measurement was not possible - /// (e.g. due to running inside Miri). + /// (e.g. due to running on wasm). exec_time: Option<f64>, } |
