2018-11-06 21:34:53 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-03-21 02:04:41 +01:00
|
|
|
if [ "$CIRCLE_PULL_REQUEST" != "" ]; then
|
2020-07-15 20:53:19 +02:00
|
|
|
paths=$(git diff --diff-filter ACMR --name-only origin/main.. -- test/)
|
2018-11-06 21:34:53 +01:00
|
|
|
|
|
|
|
if [ "$paths" == "" ]; then
|
|
|
|
echo No test files added or modified. Exiting.
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo New or modified test files:
|
|
|
|
echo "$paths"
|
|
|
|
echo ""
|
|
|
|
|
2019-03-21 02:04:41 +01:00
|
|
|
echo "Running the tests with test262-harness"
|
|
|
|
test262-harness -t 1 --hostType=$hostType --hostPath=$hostPath --hostArgs="$hostArgs" -- $paths | tee exec.out
|
2018-11-06 21:34:53 +01:00
|
|
|
|
2019-03-21 02:04:41 +01:00
|
|
|
if grep -q '^[1-9][0-9]* failed$' exec.out; then
|
|
|
|
rm exec.out
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-11-06 21:34:53 +01:00
|
|
|
|
2019-03-21 02:04:41 +01:00
|
|
|
rm exec.out
|
2018-11-06 21:34:53 +01:00
|
|
|
fi
|