| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
: "${SRCDIR:=./js/src}" |
| 4 |
: "${BUILDDIR:=./debian/build}" |
| 5 |
: "${DEB_HOST_ARCH:=$(dpkg --print-architecture)}" |
| 6 |
|
| 7 |
# Sometimes the build doesn't make these executable for some reason |
| 8 |
chmod 0755 "$BUILDDIR/js/src/js" |
| 9 |
chmod 0755 "$BUILDDIR/dist/bin/js" |
| 10 |
|
| 11 |
if "$BUILDDIR/js/src/js" -e 'print("Hello, world")'; then |
| 12 |
echo "Smoke-test successful, continuing with full test suite" |
| 13 |
else |
| 14 |
echo "Smoke-test failed: did interpreter initialization fail? (see #873778)" |
| 15 |
exit 1 |
| 16 |
fi |
| 17 |
|
| 18 |
export DEB_HOST_ARCH |
| 19 |
|
| 20 |
for exclude; do |
| 21 |
EXCLUDES="${EXCLUDES:+${EXCLUDES} }--exclude ${exclude}" |
| 22 |
done |
| 23 |
|
| 24 |
if make -C ${BUILDDIR} -k check-jstests; then |
| 25 |
echo "check-jstests successful" |
| 26 |
else |
| 27 |
echo "check-jstests failed" |
| 28 |
exit 1 |
| 29 |
fi |
| 30 |
|
| 31 |
# we want to expand --exclude to several arguments |
| 32 |
# shellcheck disable=SC2086 |
| 33 |
if python3 -u \ |
| 34 |
"${SRCDIR}"/jit-test/jit_test.py \ |
| 35 |
--format=automation \ |
| 36 |
--no-slow \ |
| 37 |
--no-progress \ |
| 38 |
--timeout 600 \ |
| 39 |
${EXCLUDES:-} \ |
| 40 |
"${BUILDDIR}"/dist/bin/js basic; then |
| 41 |
echo "check-jit-test successful" |
| 42 |
else |
| 43 |
echo "check-jit-test failed" |
| 44 |
exit 1 |
| 45 |
fi |