diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 15:07:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 15:07:22 +0000 |
commit | f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7 (patch) | |
tree | ce9e8db2d4e8799780fa72ae8f1953039373e2ee /tests/run-test.sh.in | |
parent | Initial commit. (diff) | |
download | gnome-shell-f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7.tar.xz gnome-shell-f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7.zip |
Adding upstream version 3.38.6.upstream/3.38.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-test.sh.in')
-rwxr-xr-x | tests/run-test.sh.in | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/run-test.sh.in b/tests/run-test.sh.in new file mode 100755 index 0000000..ea6d157 --- /dev/null +++ b/tests/run-test.sh.in @@ -0,0 +1,45 @@ +#!/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="$builddir/../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 |