[gnome-shell/nbtk-introduction] run-test.sh: support running tests under gdb



commit 9c3af62dc494744fd8fd4ca6be7b376f07ea3c7b
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Sat Sep 19 21:27:01 2009 -0400

    run-test.sh: support running tests under gdb
    
    As with the 'gnome-shell' -g/--debug can be passed to run under
    the debugger.

 tests/run-test.sh.in |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tests/run-test.sh.in b/tests/run-test.sh.in
index 4436187..1ee197e 100644
--- a/tests/run-test.sh.in
+++ b/tests/run-test.sh.in
@@ -7,8 +7,12 @@ usage() {
 
 tests=
 verbose=false
+debug=
 for arg in $@ ; do
     case $arg in
+	-g|--debug)
+	    debug="gdb --args"
+	    ;;
 	-v|--verbose)
 	    verbose=true
 	    ;;
@@ -40,5 +44,5 @@ for i in $srcdir $srcdir/../js @GJS_JS_DIR@ @GJS_JS_NATIVE_DIR@ ; do
 done
 
 for test in $tests ; do
-    gjs-console $gjs_args $test || exit $?
+    $debug gjs-console $gjs_args $test || exit $?
 done



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]