test: 默认关闭逐测试运行日志

This commit is contained in:
爱特每羊队
2026-06-14 20:16:33 +08:00
parent 59ac640e1d
commit c766d69d0a
+7 -6
View File
@@ -725,7 +725,7 @@ fn run_tests() -> bool {
.filter(|&n| n > 0) .filter(|&n| n > 0)
.unwrap_or_else(|| std::thread::available_parallelism().map(|n| n.get()).unwrap_or(4)) .unwrap_or_else(|| std::thread::available_parallelism().map(|n| n.get()).unwrap_or(4))
.min(total.max(1)); .min(total.max(1));
let _trace_paths = std::env::var_os("OXIDE_TEST262_TRACE").is_some(); let log_running_tests = std::env::var_os("OXIDE_TEST262_RUNNING_LOG").is_some();
eprintln!("running on {workers} worker thread(s)"); eprintln!("running on {workers} worker thread(s)");
@@ -771,12 +771,13 @@ fn run_tests() -> bool {
break; break;
} }
let path_str = paths_ref[i].display().to_string(); let path_str = paths_ref[i].display().to_string();
// Always record the current test path so a hard crash leaves // Always record the current test path so the panic hook can
// it visible: the panic hook prints it for Rust panics, and // identify Rust panics. Set OXIDE_TEST262_RUNNING_LOG=1 when
// the unconditional eprintln! below is the last stderr line // diagnosing OS-level crashes that need the last stderr line.
// for OS-level crashes (ACCESS_VIOLATION, stack overflow).
CURRENT_TEST_PATH.with(|p| *p.borrow_mut() = path_str.clone()); CURRENT_TEST_PATH.with(|p| *p.borrow_mut() = path_str.clone());
eprintln!(" [{tid:?}] running: {path_str}"); if log_running_tests {
eprintln!(" [{tid:?}] running: {path_str}");
}
let result = process_path( let result = process_path(
&paths_ref[i], &paths_ref[i],