gnome-shell/tests/run-test.sh.in
Florian Müllner c987d3d2c9 build: Support the meson build system
Meson is on track to replace autotools as the build system of choice,
so support it in addition to autotools. If all goes well, we'll
eventually be able to drop the latter ...

https://bugzilla.gnome.org/show_bug.cgi?id=783229
2017-07-20 00:20:54 +02:00

46 lines
1.0 KiB
Bash
Executable File

#!/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=@srcdir@
srcdir=`cd $srcdir && pwd`
GI_TYPELIB_PATH="$GI_TYPELIB_PATH${GI_TYPELIB_PATH:+:}@MUTTER_TYPELIB_DIR@:$builddir/../src:$builddir/../src/st:$builddir/../subprojects/gvc"
GJS_PATH="$srcdir:$srcdir/../js:$builddir/../js"
GJS_DEBUG_OUTPUT=stderr
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
GNOME_SHELL_TESTSDIR="$srcdir/"
GNOME_SHELL_JS="$srcdir/../js"
GNOME_SHELL_DATADIR="$srcdir/../data"
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_TESTSDIR GNOME_SHELL_JS GNOME_SHELL_DATADIR LD_PRELOAD
for test in $tests ; do
$debug $builddir/../src/run-js-test $test || exit $?
done