Skip to content

Commit

Permalink
Environment variable to run a subset of 262 tests
Browse files Browse the repository at this point in the history
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
  • Loading branch information
justingrant committed Sep 9, 2021
1 parent 899cc24 commit bc1f3c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion polyfill/ci_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

TESTS=${@:-"./*/**/*.js"}
TESTS=${TESTS:-"./*/**/*.js"}
TIMEOUT=${TIMEOUT:-10000}
PRELUDE=${PRELUDE:-script.js}

export NODE_PATH=$PWD/node_modules
Expand Down Expand Up @@ -37,6 +38,7 @@ test262-harness \
--reporter-keys file,rawResult,result,scenario \
--test262Dir ../test262 \
--prelude "../$PRELUDE" \
--timeout "$TIMEOUT" \
--preprocessor ./preprocessor.test262.js \
$TRANSFORMER_ARG \
"$TESTS" \
Expand Down

0 comments on commit bc1f3c3

Please sign in to comment.