aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/devtest/run_testsuite.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-04-24 11:15:11 -0700
committerMartin Braun <martin.braun@ettus.com>2019-04-25 10:46:44 -0700
commit600f655e8e13c934873ad72a9228f1cfb28c05bc (patch)
tree8b1f320a160f315b21a75aa036bb1cfdddf57253 /host/tests/devtest/run_testsuite.py
parentf6f2e96116164d416387d828121fb330d5108b05 (diff)
downloaduhd-600f655e8e13c934873ad72a9228f1cfb28c05bc.tar.gz
uhd-600f655e8e13c934873ad72a9228f1cfb28c05bc.tar.bz2
uhd-600f655e8e13c934873ad72a9228f1cfb28c05bc.zip
tests: Make the Python interpreter for devtests a parameter
When running 'make test_***', it now also defaults to RUNTIME_PYTHON_EXECUTABLE.
Diffstat (limited to 'host/tests/devtest/run_testsuite.py')
-rwxr-xr-xhost/tests/devtest/run_testsuite.py11
1 files changed, 6 insertions, 5 deletions
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())
-