Skip to content

Commit f470105

Browse files
committed
libtest: also measure time in Miri
1 parent 23d47db commit f470105

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

library/test/src/console.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Resu
316316
// Prevent the usage of `Instant` in some cases:
317317
// - It's currently not supported for wasm targets.
318318
// - We disable it for miri because it's not available when isolation is enabled.
319-
let is_instant_unsupported = (cfg!(target_family = "wasm") && !cfg!(target_os = "wasi"))
320-
|| cfg!(target_os = "zkvm")
321-
|| cfg!(miri);
319+
let is_instant_unsupported =
320+
(cfg!(target_family = "wasm") && !cfg!(target_os = "wasi")) || cfg!(target_os = "zkvm");
322321

323322
let start_time = (!is_instant_unsupported).then(Instant::now);
324323
run_tests(opts, tests, |x| on_test_event(&x, &mut st, &mut *out))?;

src/bootstrap/src/utils/render_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ struct SuiteOutcome {
377377
measured: usize,
378378
filtered_out: usize,
379379
/// The time it took to execute this test suite, or `None` if time measurement was not possible
380-
/// (e.g. due to running inside Miri).
380+
/// (e.g. due to running on wasm).
381381
exec_time: Option<f64>,
382382
}
383383

0 commit comments

Comments
 (0)