Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ sudo: false
script:
- ./build.sh
- ./run-test262.sh
- cat dmdscript-test262.log
18 changes: 16 additions & 2 deletions run-test262.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e

if ! [ -d test262 ] ; then
Expand All @@ -16,7 +16,21 @@ fi

echo "Running the test suite..."
cd test262-harness-py
src/test262.py --summary --non_strict_only --command ../timed-dmdscript.sh --tests=../test262 > ../dmdscript-test262.log
src/test262.py --summary --non_strict_only --command ../timed-dmdscript.sh --tests=../test262 | tee ../dmdscript-test262.log | grep '=== .* failed in .* ==='
cd ..

EXPECTED_TO_PASS=5238
PASSED=$(grep ' - Passed [0-9]* tests' dmdscript-test262.log | sed -n 's/.*Passed \([0-9]*\) tests.*/\1/;P')

if [ "$PASSED" -gt "$EXPECTED_TO_PASS" ]; then
echo "The number of passed tests has increased ($PASSED vs. $EXPECTED_TO_PASS)."
echo "EXPECTED_TO_PASS in run-test262.sh needs to be adjusted accordingly."
exit 1
fi

if [ "$PASSED" -lt "$EXPECTED_TO_PASS" ]; then
echo "The number of passed tests has decreased: $PASSED vs. $EXPECTED_TO_PASS"
exit 2
fi

echo "Done."