}
/* 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;
size_t buf_len;
int eval_flags, ret_code, ret;
JSValue res_val;
- BOOL can_block;
outfile = stdout; /* for js_print */
}
JS_SetRuntimeInfo(rt, filename);
- can_block = TRUE;
JS_SetCanBlock(rt, can_block);
/* loader for ES6 modules */
"-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);
}
const char *ignore = "";
BOOL is_test262_harness = FALSE;
BOOL is_module = FALSE;
+ BOOL can_block = TRUE;
BOOL count_skipped_features = FALSE;
clock_t clocks;
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 {
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;