aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/devtest
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests/devtest')
-rw-r--r--host/tests/devtest/python_api_test.py12
-rwxr-xr-xhost/tests/devtest/uhd_test_base.py2
2 files changed, 5 insertions, 9 deletions
diff --git a/host/tests/devtest/python_api_test.py b/host/tests/devtest/python_api_test.py
index ef7a3ca1b..9cf168232 100644
--- a/host/tests/devtest/python_api_test.py
+++ b/host/tests/devtest/python_api_test.py
@@ -7,6 +7,7 @@
""" Test Python API """
import os
+import sys
from uhd_test_base import shell_application
from uhd_test_base import UHDPythonTestCase
@@ -19,17 +20,12 @@ class uhd_python_api_test(UHDPythonTestCase):
Run test and report results.
"""
devtest_src_dir = os.getenv('_UHD_DEVTEST_SRC_DIR', '')
- multi_usrp_test_path = \
- os.path.join(devtest_src_dir, 'multi_usrp_test.py')
args = [
+ os.path.join(devtest_src_dir, 'multi_usrp_test.py'),
self.create_addr_args_str(),
]
- app = None
- if os.name == 'nt':
- args.insert(0, multi_usrp_test_path)
- app = shell_application('python')
- else:
- app = shell_application(multi_usrp_test_path)
+ # The 'app' we are running is just another Python process
+ app = shell_application(sys.executable)
app.run(args)
run_results = {
'return_code': app.returncode,
diff --git a/host/tests/devtest/uhd_test_base.py b/host/tests/devtest/uhd_test_base.py
index 698ba4be3..173b91053 100755
--- a/host/tests/devtest/uhd_test_base.py
+++ b/host/tests/devtest/uhd_test_base.py
@@ -56,7 +56,7 @@ def filter_stderr(stderr, run_results=None):
#--------------------------------------------------------------------------
# Application
#--------------------------------------------------------------------------
-class shell_application(object):
+class shell_application:
"""
Wrapper for applications that are in $PATH.
Note: The CMake infrastructure makes sure all examples and utils are in $PATH.