Skip to content

Commit bc1f3c3

Browse files
committed
Environment variable to run a subset of 262 tests
Now you can use a TESTS= environment variable to select a subset of Test262 tests to run. If omitted, all tests will run. Also adds a TIMEOUT environment variable (in msecs) to control test timeouts, which is helpful when pausing tests under a debugger. Default is 10,000ms === 10 seconds. Example: TESTS=*/prototype/subtract/* npm run test262
1 parent 899cc24 commit bc1f3c3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

polyfill/ci_test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
TESTS=${@:-"./*/**/*.js"}
3+
TESTS=${TESTS:-"./*/**/*.js"}
4+
TIMEOUT=${TIMEOUT:-10000}
45
PRELUDE=${PRELUDE:-script.js}
56

67
export NODE_PATH=$PWD/node_modules
@@ -37,6 +38,7 @@ test262-harness \
3738
--reporter-keys file,rawResult,result,scenario \
3839
--test262Dir ../test262 \
3940
--prelude "../$PRELUDE" \
41+
--timeout "$TIMEOUT" \
4042
--preprocessor ./preprocessor.test262.js \
4143
$TRANSFORMER_ARG \
4244
"$TESTS" \

0 commit comments

Comments
 (0)