4800f63c3a
We were going to great effort to include the normal directories in the GJS search path and the code to to do this broke recently when jsdir and jsnativedir were moved to gjs-internals-1.0.pc. However, it was actually unnecessary since the standard directories are appended to the default path. (We continue to use a GNOME_SHELL_JS envvar separate from GJS_PATH for the Shell to enable the somewhat unlikely case where someone wants to invoke the shell specifying a GJS_PATH.) https://bugzilla.gnome.org/show_bug.cgi?id=635367
44 lines
848 B
Bash
44 lines
848 B
Bash
#!/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_LIB_DIR@/mutter:$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
|