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`
|
|
|
|
|
2009-09-19 21:10:15 -04:00
|
|
|
GI_TYPELIB_PATH="@MUTTER_LIB_DIR@/mutter:$builddir/../src"
|
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/"
|
|
|
|
|
2010-11-20 13:01:43 -05:00
|
|
|
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_JS GNOME_SHELL_TESTSDIR 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
|