From 5238ba426a73a2c5b702dd923fc6527a61522620 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Sun, 14 Jun 2026 20:16:33 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E9=80=90=E6=B5=8B=E8=AF=95=E8=BF=90=E8=A1=8C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_test262/src/main.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/oxide_test262/src/main.rs b/crates/oxide_test262/src/main.rs index 7ce93289..c20b4d0e 100644 --- a/crates/oxide_test262/src/main.rs +++ b/crates/oxide_test262/src/main.rs @@ -725,7 +725,7 @@ fn run_tests() -> bool { .filter(|&n| n > 0) .unwrap_or_else(|| std::thread::available_parallelism().map(|n| n.get()).unwrap_or(4)) .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)"); @@ -771,12 +771,13 @@ fn run_tests() -> bool { break; } let path_str = paths_ref[i].display().to_string(); - // Always record the current test path so a hard crash leaves - // it visible: the panic hook prints it for Rust panics, and - // the unconditional eprintln! below is the last stderr line - // for OS-level crashes (ACCESS_VIOLATION, stack overflow). + // Always record the current test path so the panic hook can + // identify Rust panics. Set OXIDE_TEST262_RUNNING_LOG=1 when + // diagnosing OS-level crashes that need the last stderr line. 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( &paths_ref[i],