aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/devtest
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests/devtest')
-rw-r--r--host/tests/devtest/CMakeLists.txt3
-rwxr-xr-xhost/tests/devtest/run_testsuite.py11
2 files changed, 8 insertions, 6 deletions
diff --git a/host/tests/devtest/CMakeLists.txt b/host/tests/devtest/CMakeLists.txt
index c74b74a99..3b17f38d1 100644
--- a/host/tests/devtest/CMakeLists.txt
+++ b/host/tests/devtest/CMakeLists.txt
@@ -23,12 +23,13 @@ UHD_INSTALL(PROGRAMS
macro(ADD_DEVTEST pattern filter devtype)
message(STATUS "Adding ${devtype} device test target")
add_custom_target("test_${pattern}"
- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_testsuite.py
+ ${RUNTIME_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/run_testsuite.py
"--src-dir" "${CMAKE_CURRENT_SOURCE_DIR}"
"--devtest-pattern" "${pattern}"
"--device-filter" "${filter}"
"--build-type" "${CMAKE_BUILD_TYPE}"
"--build-dir" "${CMAKE_BINARY_DIR}"
+ "--python-interp" "${RUNTIME_PYTHON_EXECUTABLE}"
COMMENT "Running device test on all connected ${devtype} devices:"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
diff --git a/host/tests/devtest/run_testsuite.py b/host/tests/devtest/run_testsuite.py
index 99871b150..9f557a946 100755
--- a/host/tests/devtest/run_testsuite.py
+++ b/host/tests/devtest/run_testsuite.py
@@ -21,11 +21,13 @@ 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', default=None, required=True, help='b200, x300, ...')
+ parser.add_argument('--device-filter', '-f', required=True, help='b200, x300, ...')
parser.add_argument('--log-dir', '-l', default='.')
- parser.add_argument('--src-dir', default='.', help='Directory where the test sources are stored')
- parser.add_argument('--build-dir', default=None, help='Build dir (where examples/ and utils/ are)')
+ parser.add_argument('--src-dir', default='.',
+ help='Directory where the test sources are stored')
+ parser.add_argument('--build-dir', help='Build dir (where examples/ and utils/ are)')
parser.add_argument('--build-type', default='Release')
+ parser.add_argument('--python-interp', default=sys.executable)
return parser
def setup_env(args):
@@ -114,7 +116,7 @@ def main():
env['_UHD_DEVTEST_SRC_DIR'] = str(args.src_dir)
proc = subprocess.Popen(
[
- "python", "-m", "unittest", "discover", "-v",
+ args.python_interp, "-m", "unittest", "discover", "-v",
"-s", args.src_dir,
"-p", devtest_pattern,
],
@@ -133,4 +135,3 @@ def main():
if __name__ == "__main__":
exit(not main())
-