2009-09-18 15:51:15 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
echo >&2 "Usage run-test.sh [-v|--verbose] <test_js>..."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
tests=
|
|
|
|
verbose=false
|
2009-09-19 21:27:01 -04:00
|
|
|
debug=
|
2009-09-18 15:51:15 -04:00
|
|
|
for arg in $@ ; do
|
|
|
|
case $arg in
|
2009-09-19 21:27:01 -04:00
|
|
|
-g|--debug)
|
2010-10-31 15:28:06 -04:00
|
|
|
debug="libtool --mode=execute gdb --args"
|
2009-09-19 21:27:01 -04:00
|
|
|
;;
|
2009-09-18 15:51:15 -04:00
|
|
|
-v|--verbose)
|
|
|
|
verbose=true
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
usage
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
tests="$tests $arg"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
builddir=`dirname $0`
|
|
|
|
builddir=`cd $builddir && pwd`
|
|
|
|
srcdir=$builddir/@srcdir@
|
|
|
|
srcdir=`cd $srcdir && pwd`
|
|
|
|
|
2013-01-14 14:19:36 -05:00
|
|
|
GI_TYPELIB_PATH="$GI_TYPELIB_PATH${GI_TYPELIB_PATH:+:}@MUTTER_TYPELIB_DIR@:$builddir/../src:$builddir/../src/gvc"
|
2010-11-20 13:01:43 -05:00
|
|
|
GJS_PATH="$srcdir:$srcdir/../js"
|
2009-09-18 15:51:15 -04:00
|
|
|
GJS_DEBUG_OUTPUT=stderr
|
|
|
|
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
|
|
|
|
GNOME_SHELL_TESTSDIR="$srcdir/"
|
2012-12-22 23:04:27 -05:00
|
|
|
GNOME_SHELL_JS="$srcdir/../js"
|
|
|
|
GNOME_SHELL_DATADIR="$srcdir/../data"
|
2009-09-18 15:51:15 -04:00
|
|
|
|
2012-12-22 23:04:27 -05:00
|
|
|
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_TESTSDIR GNOME_SHELL_JS GNOME_SHELL_DATADIR LD_PRELOAD
|
2009-09-18 15:51:15 -04:00
|
|
|
|
|
|
|
for test in $tests ; do
|
2010-11-20 13:01:43 -05:00
|
|
|
$debug $builddir/../src/run-js-test $test || exit $?
|
2009-09-18 15:51:15 -04:00
|
|
|
done
|