diff options
author | Matthew Crymble <matthew.crymble@ni.com> | 2020-05-16 19:24:17 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-05-27 09:46:01 -0500 |
commit | 6810cf2a4cab3884f08f39a092211dc0cc5755c9 (patch) | |
tree | 49b8bef77013595cef85c31f0bf0dced38e51a84 /host/tests | |
parent | 655b32fc1c354cbad9d91d6f268a020ddd0ac93b (diff) | |
download | uhd-6810cf2a4cab3884f08f39a092211dc0cc5755c9.tar.gz uhd-6810cf2a4cab3884f08f39a092211dc0cc5755c9.tar.bz2 uhd-6810cf2a4cab3884f08f39a092211dc0cc5755c9.zip |
tests: updated devtest runner to use standard device args
This will allow run_testsuite.py to be called for specific devices instead
of all devices for a certain type.
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/devtest/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | host/tests/devtest/run_testsuite.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/host/tests/devtest/CMakeLists.txt b/host/tests/devtest/CMakeLists.txt index 3b17f38d1..5649aeb5e 100644 --- a/host/tests/devtest/CMakeLists.txt +++ b/host/tests/devtest/CMakeLists.txt @@ -26,7 +26,7 @@ macro(ADD_DEVTEST pattern filter devtype) ${RUNTIME_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_testsuite.py "--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}" "--devtest-pattern" "${pattern}" - "--device-filter" "${filter}" + "--args" "type=${filter}" "--build-type" "${CMAKE_BUILD_TYPE}" "--build-dir" "${CMAKE_BINARY_DIR}" "--python-interp" "${RUNTIME_PYTHON_EXECUTABLE}" diff --git a/host/tests/devtest/run_testsuite.py b/host/tests/devtest/run_testsuite.py index 0c82fe9c6..feb6d4b70 100755 --- a/host/tests/devtest/run_testsuite.py +++ b/host/tests/devtest/run_testsuite.py @@ -20,7 +20,7 @@ def setup_parser(): """ Set up argparser """ parser = argparse.ArgumentParser(description="Test utility for UHD/USRP.") parser.add_argument('--devtest-pattern', '-p', default='*', help='e.g. b2xx') - parser.add_argument('--device-filter', '-f', required=True, help='b200, x300, ...') + parser.add_argument('--args', '-a', default='', help='Device address arguments') parser.add_argument('--log-dir', '-l', default='.') parser.add_argument('--src-dir', default='.', help='Directory where the test sources are stored') @@ -86,7 +86,7 @@ def main(): args = setup_parser().parse_args() env = setup_env(args) devtest_pattern = "devtest_{p}.py".format(p=args.devtest_pattern) - uhd_args_list = get_usrp_list("type=" + args.device_filter, env) + uhd_args_list = get_usrp_list(args.args, env) if len(uhd_args_list) == 0: print("No devices found. Exiting.") exit(1) |