From 6810cf2a4cab3884f08f39a092211dc0cc5755c9 Mon Sep 17 00:00:00 2001 From: Matthew Crymble Date: Sat, 16 May 2020 19:24:17 -0500 Subject: 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. --- host/tests/devtest/CMakeLists.txt | 2 +- host/tests/devtest/run_testsuite.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'host/tests') 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) -- cgit v1.2.3