Merge bfbbfe999bf1fdd207c5dd33816fa2bcc607176f into d73189dd5a582c19c565774bd56fed4e72d33c99

This commit is contained in:
Ivan Krasilnikov 2026-05-22 14:40:35 +08:00 committed by GitHub
commit 5f8e766fc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1889,7 +1889,7 @@ int run_test(const char *filename, int index)
}
/* run a test when called by test262-harness+eshost */
int run_test262_harness_test(const char *filename, BOOL is_module)
int run_test262_harness_test(const char *filename, BOOL is_module, BOOL can_block)
{
JSRuntime *rt;
JSContext *ctx;
@ -1897,7 +1897,6 @@ int run_test262_harness_test(const char *filename, BOOL is_module)
size_t buf_len;
int eval_flags, ret_code, ret;
JSValue res_val;
BOOL can_block;
outfile = stdout; /* for js_print */
@ -1912,7 +1911,6 @@ int run_test262_harness_test(const char *filename, BOOL is_module)
}
JS_SetRuntimeInfo(rt, filename);
can_block = TRUE;
JS_SetCanBlock(rt, can_block);
/* loader for ES6 modules */
@ -2055,7 +2053,8 @@ void help(void)
"-e file load the known errors from 'file'\n"
"-f file execute single test from 'file'\n"
"-r file set the report file name (default=none)\n"
"-x file exclude tests listed in 'file'\n");
"-x file exclude tests listed in 'file'\n"
"--no-can-block set [[CanBlock]] to false (Atomics.wait will throw)\n");
exit(1);
}
@ -2076,6 +2075,7 @@ int main(int argc, char **argv)
const char *ignore = "";
BOOL is_test262_harness = FALSE;
BOOL is_module = FALSE;
BOOL can_block = TRUE;
BOOL count_skipped_features = FALSE;
clock_t clocks;
@ -2144,6 +2144,8 @@ int main(int argc, char **argv)
is_test262_harness = TRUE;
} else if (str_equal(arg, "--module")) {
is_module = TRUE;
} else if (str_equal(arg, "--no-can-block")) {
can_block = FALSE;
} else if (str_equal(arg, "--count_skipped_features")) {
count_skipped_features = TRUE;
} else {
@ -2156,7 +2158,7 @@ int main(int argc, char **argv)
help();
if (is_test262_harness) {
return run_test262_harness_test(argv[optind], is_module);
return run_test262_harness_test(argv[optind], is_module, can_block);
}
error_out = stdout;