summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlicia Boya GarcĂ­a <ntrrgc@gmail.com>2018-05-24 18:25:59 +0200
committerThibault Saunier <tsaunier@igalia.com>2018-05-25 12:59:38 +0200
commit2c32ccd7a78c1fdc95819332f5c71f572ae0a41e (patch)
tree5ba04e86257387ddf3ae43bfe05e53af94da4af1
parent683b19895e2cc12512f83e8557ffc42089291d45 (diff)
gst-validate-launcher: Stop in --gdb by default, add --gdb-non-stop
This patch modifies the default behavior of --gdb to not run and quit automatically the test, but rather wait for user input. This is usually much more convenient to debug all kinds of bugs. The automatic run behavior has been moved to a new command switch: --gdb-non-stop https://bugzilla.gnome.org/show_bug.cgi?id=796389
-rw-r--r--validate/launcher/baseclasses.py6
-rw-r--r--validate/launcher/main.py6
2 files changed, 11 insertions, 1 deletions
diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py
index 944aad0..a1d209c 100644
--- a/validate/launcher/baseclasses.py
+++ b/validate/launcher/baseclasses.py
@@ -385,7 +385,11 @@ class Test(Loggable):
if self.hard_timeout is not None:
self.hard_timeout *= GDB_TIMEOUT_FACTOR
self.timeout *= GDB_TIMEOUT_FACTOR
- return ["gdb", "-ex", "run", "-ex", "backtrace", "-ex", "quit", "--args"] + command
+ args = ["gdb"]
+ if self.options.gdb_non_stop:
+ args += ["-ex", "run", "-ex", "backtrace", "-ex", "quit"]
+ args += ["--args"] + command
+ return args
def use_valgrind(self, command, subenv):
vglogsfile = self.logfile + '.valgrind'
diff --git a/validate/launcher/main.py b/validate/launcher/main.py
index 6590f29..35e8a6f 100644
--- a/validate/launcher/main.py
+++ b/validate/launcher/main.py
@@ -237,6 +237,9 @@ class LauncherConfig(Loggable):
else:
self.output_dir = os.path.abspath(self.output_dir)
+ if self.gdb_non_stop:
+ self.gdb = True
+
if self.gdb:
self.logsdir = "stdout"
self.debug = True
@@ -457,6 +460,9 @@ Note that all testsuite should be inside python modules, so the directory should
action="store_true",
help="Run the tests inside gdb (implies"
" --output-dir=stdout and --jobs=1)")
+ parser.add_argument("--gdb-non-stop", dest="gdb_non_stop",
+ action="store_true",
+ help="Run the test automatically in gdb (implies --gdb)")
parser.add_argument("-nd", "--no-display", dest="no_display",
action="store_true",
help="Run the tests without outputting graphics"