aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-09-21 22:34:15 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-09-28 06:24:05 -0700
commit30a40395b92fa31ad74c0435a970e92c90a942d4 (patch)
tree57d9fc15420d3591b735ea9a3a3f02bece8e125c /host/tests
parentd0e75f66fabacd2bc97981df6b0525b196a86fc5 (diff)
downloaduhd-30a40395b92fa31ad74c0435a970e92c90a942d4.tar.gz
uhd-30a40395b92fa31ad74c0435a970e92c90a942d4.tar.bz2
uhd-30a40395b92fa31ad74c0435a970e92c90a942d4.zip
devtest: Add receive stability test to B2xx devtest
Diffstat (limited to 'host/tests')
-rwxr-xr-xhost/tests/devtest/devtest_b2xx.py1
-rw-r--r--host/tests/devtest/python_rx_stability_test.py51
2 files changed, 52 insertions, 0 deletions
diff --git a/host/tests/devtest/devtest_b2xx.py b/host/tests/devtest/devtest_b2xx.py
index 2134d11b5..9e054bf84 100755
--- a/host/tests/devtest/devtest_b2xx.py
+++ b/host/tests/devtest/devtest_b2xx.py
@@ -14,6 +14,7 @@ Run device tests for the B2xx series.
from usrp_probe_test import uhd_usrp_probe_test
from python_api_test import uhd_python_api_test
+from python_rx_stability_test import uhd_python_rx_stability_test
from benchmark_rate_test import uhd_benchmark_rate_test
uhd_benchmark_rate_test.tests = {
'mimo': {
diff --git a/host/tests/devtest/python_rx_stability_test.py b/host/tests/devtest/python_rx_stability_test.py
new file mode 100644
index 000000000..be87213fa
--- /dev/null
+++ b/host/tests/devtest/python_rx_stability_test.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python3
+#
+# Copyright 2021 Ettus Research, a National Instruments Brand
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+""" Test RX Behaviour """
+
+import os
+import sys
+from uhd_test_base import shell_application
+from uhd_test_base import UHDPythonTestCase
+
+class uhd_python_rx_stability_test(UHDPythonTestCase):
+ """ Run recv_stability_test """
+ test_name = 'uhd_python_rx_stability_test'
+
+ def run_test(self, test_name, test_args):
+ """
+ Run test and report results.
+ """
+ devtest_src_dir = os.getenv('_UHD_DEVTEST_SRC_DIR', '')
+ args = [
+ os.path.join(devtest_src_dir, 'recv_stability_test.py'),
+ self.create_addr_args_str(),
+ ]
+ # The 'app' we are running is just another Python process
+ app = shell_application(sys.executable)
+ app.run(args)
+ run_results = {
+ 'return_code': app.returncode,
+ 'passed': False
+ }
+ run_results['passed'] = all([
+ app.returncode == 0,
+ ])
+ self.log.info('STDERR Output:')
+ self.log.info(str(app.stderr))
+ for key in sorted(run_results):
+ self.log.info('%s = %s', str(key), str(run_results[key]))
+ self.report_result(
+ "python_rx_tester",
+ key, run_results[key]
+ )
+ if 'passed' in run_results:
+ self.report_result(
+ "python_rx_tester",
+ 'status',
+ 'Passed' if run_results['passed'] else 'Failed',
+ )
+ return run_results