runtests: Disable valgrind when debugging
authorDan Fandrich <dan@coneharvesters.com>
Fri, 7 Feb 2014 21:15:02 +0000 (22:15 +0100)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 7 Feb 2014 21:43:34 +0000 (22:43 +0100)
This was already mostly being done, except that analysis after the
test still assumed that the valgrind log files would be available. An
alternative way to handle the valgrind + gdb combination could be to
enable one of the valgrind debugger hooks.

tests/runtests.pl

index 44b22d7..0de76e3 100755 (executable)
@@ -3334,6 +3334,13 @@ sub singletest {
         $DBGCURL=$CMDLINE;
     }
 
+    if($gdbthis) {
+        # gdb is incompatible with valgrind, so disable it when debugging
+        # Perhaps a better approach would be to run it under valgrind anyway
+        # with --db-attach=yes or --vgdb=yes.
+        $disablevalgrind=1;
+    }
+
     if($fail_due_event_based) {
         logmsg "This test cannot run event based\n";
         return -1;