]> sigrok.org Git - sigrok-test.git/blobdiff - decoder/pdtest
Fix issue in -s output.
[sigrok-test.git] / decoder / pdtest
index 58b6eee19244353226938a35cf1c7cc27d24328e..1cc071f65c438682b39d00407afb165af597a3fd 100755 (executable)
@@ -62,7 +62,7 @@ def usage(msg=None):
   -l  List test(s)
   -s  Show test(s)
   -r  Run test(s)
-  -f  Fix failed test(s)
+  -f  Fix failed test(s) / create initial output for new test(s)
   -c  Report decoder code coverage
   -R <directory>  Save test reports to <directory>
   <test>  Protocol decoder name ("i2c") and optionally test name ("i2c/rtc")""")
@@ -485,7 +485,7 @@ def show_tests(tests):
                     for label, channel in pd['channels']:
                         print("    Channel %s=%d" % (label, channel))
                     for option, value in pd['options']:
-                        print("    Option %s=%d" % (option, value))
+                        print("    Option %s=%s" % (option, value))
                 if 'stack' in tc:
                     print("  Stack: %s" % ' '.join(tc['stack']))
                 print("  Input: %s" % tc['input'])
@@ -561,7 +561,7 @@ ret = 0
 try:
     if args:
         testlist = get_tests(args)
-    elif opt_all:
+    elif opt_all or opt_list:
         testlist = get_tests(os.listdir(tests_dir))
     else:
         usage("Specify either -a or tests.")
@@ -591,4 +591,3 @@ except Exception as e:
         raise
 
 sys.exit(ret)
-