]> sigrok.org Git - libsigrokdecode.git/blobdiff - tests/pdtest
pdtest: Use -dd to turn on SR/SRD debugging.
[libsigrokdecode.git] / tests / pdtest
index ac511650021ebd5090d8d21da880da2c7bf8684c..ef0c3503ad23d780d3c4b201d1255e1e78f44ce1 100755 (executable)
@@ -7,7 +7,7 @@ from tempfile import mkstemp
 from subprocess import Popen, PIPE
 from difflib import Differ
 
-DEBUG = False
+DEBUG = 0
 VERBOSE = False
 
 
@@ -221,6 +221,8 @@ def run_tests(tests):
     for tclist in tests:
         for tc in tclist:
             args = [cmd]
+            if DEBUG > 1:
+                args.append('-d')
             for pd in tc['pdlist']:
                 args.extend(['-P', pd['name']])
                 for label, probe in pd['probes']:
@@ -358,7 +360,7 @@ report_dir = None
 opts, args = getopt(sys.argv[1:], "dvarslRS:")
 for opt, arg in opts:
     if opt == '-d':
-        DEBUG = True
+        DEBUG += 1
     if opt == '-v':
         VERBOSE = True
     elif opt == '-a':