File: test.sh

package info (click to toggle)
mozjs140 140.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,216,752 kB
  • sloc: javascript: 2,267,210; cpp: 1,423,664; python: 966,252; ansic: 632,297; xml: 115,965; sh: 15,392; asm: 13,399; makefile: 10,455; yacc: 4,504; perl: 2,223; lex: 1,414; ruby: 1,064; exp: 756; java: 185; sql: 66; sed: 18
file content (45 lines) | stat: -rwxr-xr-x 1,050 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh

: "${SRCDIR:=./js/src}"
: "${BUILDDIR:=./debian/build}"
: "${DEB_HOST_ARCH:=$(dpkg --print-architecture)}"

# Sometimes the build doesn't make these executable for some reason
chmod 0755 "$BUILDDIR/js/src/js"
chmod 0755 "$BUILDDIR/dist/bin/js"

if "$BUILDDIR/js/src/js" -e 'print("Hello, world")'; then
	echo "Smoke-test successful, continuing with full test suite"
else
	echo "Smoke-test failed: did interpreter initialization fail? (see #873778)"
	exit 1
fi

export DEB_HOST_ARCH

for exclude; do
	EXCLUDES="${EXCLUDES:+${EXCLUDES} }--exclude ${exclude}"
done

if make -C ${BUILDDIR} -k check-jstests; then
	echo "check-jstests successful"
else
	echo "check-jstests failed"
	exit 1
fi

# we want to expand --exclude to several arguments
# shellcheck disable=SC2086
if python3 -u \
   "${SRCDIR}"/jit-test/jit_test.py \
   --format=automation \
   --no-slow \
   --no-progress \
   --timeout 600 \
   ${EXCLUDES:-} \
   "${BUILDDIR}"/dist/bin/js basic; then
	echo "check-jit-test successful"
else
	echo "check-jit-test failed"
	exit 1
fi