gnome-shell/tests/run-test.sh.in
Dan Winship ae96b0c971 Use libmutter-wm, and build a real gnome-shell binary
Build gnome-shell as a binary linked against libmutter-wm, instead of
a module to be loaded by libmutter-wm. Move the majority of
initialization-type stuff from gnome_shell_plugin_start() into main().

We still build libgnome-shell as a shared library, so that the linker
doesn't discard all the methods that are never called from C.

https://bugzilla.gnome.org/show_bug.cgi?id=641724
2011-03-07 18:33:33 -05:00

44 lines
845 B
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=$builddir/@srcdir@
srcdir=`cd $srcdir && pwd`
GI_TYPELIB_PATH="@MUTTER_TYPELIB_DIR@:$builddir/../src"
GJS_PATH="$srcdir:$srcdir/../js"
GJS_DEBUG_OUTPUT=stderr
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
GNOME_SHELL_TESTSDIR="$srcdir/"
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_JS GNOME_SHELL_TESTSDIR LD_PRELOAD
for test in $tests ; do
$debug $builddir/../src/run-js-test $test || exit $?
done