mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
fix: test262 添加执行步数上限
This commit is contained in:
@@ -599,7 +599,14 @@ fn run_tests() -> bool {
|
|||||||
let paths = discover_tests(&test262_root);
|
let paths = discover_tests(&test262_root);
|
||||||
eprintln!("found {} test files", paths.len());
|
eprintln!("found {} test files", paths.len());
|
||||||
|
|
||||||
let kernel = Arc::new(OxideKernel::new(KernelConfig::minimal()));
|
// Bound each test's execution so a single infinite-loop / unsupported-feature
|
||||||
|
// loop fails (or skips) instead of stalling the whole serial run. The VM already
|
||||||
|
// emits a "VM step limit exceeded" error on overrun, which the runner classifies
|
||||||
|
// as a step-limit result (skip by default, fail under --no-skip). Override only the
|
||||||
|
// runner's local config; KernelConfig::minimal() stays unbounded for other crates.
|
||||||
|
let mut kernel_config = KernelConfig::minimal();
|
||||||
|
kernel_config.max_steps = Some(50_000_000);
|
||||||
|
let kernel = Arc::new(OxideKernel::new(kernel_config));
|
||||||
init_kernel_builtins(&kernel);
|
init_kernel_builtins(&kernel);
|
||||||
let harness_sources = HarnessSources::new();
|
let harness_sources = HarnessSources::new();
|
||||||
let mut harness_cache = HarnessPrefixCache::new();
|
let mut harness_cache = HarnessPrefixCache::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user