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 /library/test | |
| parent | 23d47dba319331d4418827cfbb8c1af283497d3c (diff) | |
| download | rust-510720e9fcb1181cc2e634fe6edddadf2d2c4993.tar.gz rust-510720e9fcb1181cc2e634fe6edddadf2d2c4993.zip | |
libtest: also measure time in Miri
Diffstat (limited to 'library/test')
| -rw-r--r-- | library/test/src/console.rs | 6 |
1 files changed, 2 insertions, 4 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))?; |
