test262/tools/scripts/ci_test.sh
Leo Balter 3d4909b0fd
Use .. for git diffs in the CI routines (#2140)
the double dot gets only commits not in the left side of the double dot.

The right side assumes HEAD.

This will allow us to fetch the correct list of new or modified files in the current branch.
2019-04-25 17:56:55 -04:00

25 lines
555 B
Bash
Executable File

#!/bin/bash
if [ "$CIRCLE_PULL_REQUEST" != "" ]; then
paths=$(git diff --diff-filter ACMR --name-only origin/master.. -- test/)
if [ "$paths" == "" ]; then
echo No test files added or modified. Exiting.
exit 0
fi
echo New or modified test files:
echo "$paths"
echo ""
echo "Running the tests with test262-harness"
test262-harness -t 1 --hostType=$hostType --hostPath=$hostPath --hostArgs="$hostArgs" -- $paths | tee exec.out
if grep -q '^[1-9][0-9]* failed$' exec.out; then
rm exec.out
exit 1
fi
rm exec.out
fi