File: run-test.sh.in

package info (click to toggle)
cinnamon 3.2.7-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,624 kB
  • sloc: ansic: 33,269; python: 18,048; xml: 1,504; makefile: 780; sh: 90; cpp: 54
file content (43 lines) | stat: -rwxr-xr-x 894 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
#!/bin/sh

usage() {
    echo >&2 "Usage run-test.sh [-v|--verbose] <test_js>..."
    exit 1
}

tests=
verbose=false
debug=
for arg in $@ ; do
    case $arg in
	-g|--debug)
	    debug="libtool --mode=execute gdb --args"
	    ;;
	-v|--verbose)
	    verbose=true
	    ;;
	-*)
	    usage
	    ;;
	*)
	    tests="$tests $arg"
	    ;;
    esac
done

builddir=`dirname $0`
builddir=`cd $builddir && pwd`
srcdir=$builddir/@srcdir@
srcdir=`cd $srcdir && pwd`

GI_TYPELIB_PATH="$GI_TYPELIB_PATH${GI_TYPELIB_PATH:+:}@MUFFIN_TYPELIB_DIR@:@JHBUILD_TYPELIBDIR@:$builddir/../src"
GJS_PATH="$srcdir:$srcdir/../js"
GJS_DEBUG_OUTPUT=stderr
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
CINNAMON_TESTSDIR="$srcdir/"

export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS CINNAMON_JS CINNAMON_TESTSDIR LD_PRELOAD

for test in $tests ; do
    $debug $builddir/../src/run-js-test $test || exit $?
done