diff options
author | Bert Vermeulen <bert@biot.com> | 2013-12-11 12:48:50 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2013-12-11 12:48:50 +0100 |
commit | c87dce4c93822df764cc380213e9a69eced7e6e9 (patch) | |
tree | 197a654e77feb5062fa0d65c14781c8f2181195d /tests | |
parent | de556baee957a019ac5c16caf1305f5441adf30c (diff) | |
download | libsigrokdecode-c87dce4c93822df764cc380213e9a69eced7e6e9.tar.gz libsigrokdecode-c87dce4c93822df764cc380213e9a69eced7e6e9.zip |
pdtest: Add option for custom sigrok-dumps repository path.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/pdtest | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/pdtest b/tests/pdtest index 1258d27..45fb342 100755 --- a/tests/pdtest +++ b/tests/pdtest @@ -348,7 +348,7 @@ if len(sys.argv) == 1: opt_all = opt_run = opt_show = opt_list = False report_dir = None -opts, args = getopt(sys.argv[1:], "dvarslR:") +opts, args = getopt(sys.argv[1:], "dvarslRS:") for opt, arg in opts: if opt == '-d': DEBUG = True @@ -364,6 +364,8 @@ for opt, arg in opts: opt_list = True elif opt == '-R': report_dir = arg + elif opt == '-S': + dumps_dir = arg if opt_run and opt_show: usage("Use either -s or -r, not both.") @@ -382,6 +384,9 @@ try: usage("Specify either -a or tests.") if opt_run: + if not os.path.isdir(dumps_dir): + ERR("Could not find sigrok-dumps repository at %s" % dumps_dir) + sys.exit(1) results, errors = run_tests(testlist) ret = errors elif opt_show: |