Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move test262 tests upstream #1853

Merged
merged 2 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: use node.js v16.x
uses: actions/setup-node@v1
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ polyfill/index.js
polyfill/index.js.map
polyfill/script.js
polyfill/script.js.map
polyfill/test262/
polyfill/*.tgz
polyfill/venv
polyfill/coverage
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "polyfill/test262"]
path = polyfill/test262
url = https://github.com/tc39/test262
28 changes: 9 additions & 19 deletions polyfill/ci_test.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
#!/bin/bash

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

export NODE_PATH=$PWD/node_modules
npm run build262
if [ ! -d "test262" ]; then
git clone --depth 1 https://github.com/tc39/test262.git
else
cd ./test262
git fetch origin
git merge --ff-only origin/master
cd ..
fi

if [ "x$COVERAGE" = xyes ]; then
nyc instrument "$PRELUDE" > script-instrumented.js
PRELUDE=script-instrumented.js
TRANSFORMER_ARG="--transformer ./transform.test262.js"
TRANSFORMER_ARG="--transformer ../../test/transform.test262.js"
fi

cd test/
pushd test262/test/

if [ "$(uname)" = 'Darwin' ]; then
threads=$(sysctl -n hw.logicalcpu)
Expand All @@ -30,22 +22,20 @@ else
fi
if [ $threads -gt 8 ]; then threads=8; fi

cp ./helpers/* ../test262/harness/

test262-harness \
-t $threads \
-r json \
--reporter-keys file,rawResult,result,scenario \
--test262Dir ../test262 \
--prelude "../$PRELUDE" \
--test262Dir .. \
--prelude "../../$PRELUDE" \
--timeout "$TIMEOUT" \
--preprocessor ./preprocessor.test262.js \
--preprocessor ../../test/preprocessor.test262.js \
$TRANSFORMER_ARG \
"$TESTS" \
| ./parseResults.js
"*/Temporal/$TESTS" \
| ../../test/parseResults.js
RESULT=$?

cd ..
popd

if [ "x$COVERAGE" = xyes ]; then
nyc report -t coverage/tmp/transformer --reporter=text-lcov > coverage/test262.lcov
Expand Down
27 changes: 0 additions & 27 deletions polyfill/test/Calendar/constructor/constructor/builtin.js

This file was deleted.

12 changes: 0 additions & 12 deletions polyfill/test/Calendar/constructor/constructor/constructor.js

This file was deleted.

25 changes: 0 additions & 25 deletions polyfill/test/Calendar/constructor/constructor/length.js

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions polyfill/test/Calendar/constructor/constructor/name.js

This file was deleted.

21 changes: 0 additions & 21 deletions polyfill/test/Calendar/constructor/constructor/prop-desc.js

This file was deleted.

30 changes: 0 additions & 30 deletions polyfill/test/Calendar/constructor/from/builtin.js

This file was deleted.

11 changes: 0 additions & 11 deletions polyfill/test/Calendar/constructor/from/calendar-object-invalid.js

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions polyfill/test/Calendar/constructor/from/calendar-object.js

This file was deleted.

19 changes: 0 additions & 19 deletions polyfill/test/Calendar/constructor/from/calendar-string-builtin.js

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions polyfill/test/Calendar/constructor/from/length.js

This file was deleted.

Loading