From 38b4ac030dcd301668288ade27ec0377d4f77968 Mon Sep 17 00:00:00 2001 From: tjjfvi Date: Wed, 20 Mar 2024 11:18:55 -0400 Subject: [PATCH] improve test printing --- tests/tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests.rs b/tests/tests.rs index 5e79be24..eee8a7de 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -91,9 +91,14 @@ fn test_run(name: &str, host: Arc>) { fn test_pre_reduce_run(path: &str, mut book: Book) { print!("{path}..."); print!(" pre-reduce"); + io::stdout().flush().unwrap(); + + let start = Instant::now(); let pre_stats = book.pre_reduce(&|x| x == "main", None, u64::MAX); - let host = hvmc::stdlib::create_host(&book); + print!(" {:.3?}...", start.elapsed()); + io::stdout().flush().unwrap(); + let host = hvmc::stdlib::create_host(&book); let Some((mut rwts, net)) = execute_host(host) else { assert_snapshot!(show_rewrites(&pre_stats.rewrites)); return;