aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhost/tests/devtest/devtest_b2xx.py16
-rw-r--r--host/tests/devtest/devtest_e320.py13
-rwxr-xr-xhost/tests/devtest/devtest_e3xx.py13
-rw-r--r--host/tests/devtest/devtest_n3x0.py13
-rwxr-xr-xhost/tests/devtest/devtest_x3x0.py13
-rw-r--r--host/tests/devtest/tx_waveforms_test.py53
6 files changed, 121 insertions, 0 deletions
diff --git a/host/tests/devtest/devtest_b2xx.py b/host/tests/devtest/devtest_b2xx.py
index b5a9915c5..49ffeea37 100755
--- a/host/tests/devtest/devtest_b2xx.py
+++ b/host/tests/devtest/devtest_b2xx.py
@@ -1,6 +1,7 @@
#
# Copyright 2015-2016 Ettus Research LLC
# Copyright 2018 Ettus Research, a National Instruments Company
+# Copyright 2019 Ettus Research, a National Instruments Brand
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
@@ -70,6 +71,21 @@ rx_samples_to_file_test.tests = {
},
}
+from tx_waveforms_test import uhd_tx_waveforms_test
+uhd_tx_waveforms_test.tests = {
+ 'chan0': {
+ 'chan': '0',
+ },
+ 'chan1': {
+ 'chan': '1',
+ 'products': ['B210',],
+ },
+ 'both_chans': {
+ 'chan': '0,1',
+ 'products': ['B210',],
+ },
+}
+
from tx_bursts_test import uhd_tx_bursts_test
from test_pps_test import uhd_test_pps_test
from gpio_test import gpio_test
diff --git a/host/tests/devtest/devtest_e320.py b/host/tests/devtest/devtest_e320.py
index 04d240e94..d20c16f0a 100644
--- a/host/tests/devtest/devtest_e320.py
+++ b/host/tests/devtest/devtest_e320.py
@@ -48,6 +48,19 @@ uhd_benchmark_rate_test.tests = {
},
}
+from tx_waveforms_test import uhd_tx_waveforms_test
+uhd_tx_waveforms_test.tests = {
+ 'chan0': {
+ 'chan': '0',
+ },
+ 'chan1': {
+ 'chan': '0',
+ },
+ 'both_chans': {
+ 'chan': '0,1',
+ },
+}
+
from rx_samples_to_file_test import rx_samples_to_file_test
from tx_bursts_test import uhd_tx_bursts_test
from test_pps_test import uhd_test_pps_test
diff --git a/host/tests/devtest/devtest_e3xx.py b/host/tests/devtest/devtest_e3xx.py
index 312bba9b6..8d6f4f751 100755
--- a/host/tests/devtest/devtest_e3xx.py
+++ b/host/tests/devtest/devtest_e3xx.py
@@ -42,6 +42,19 @@ rx_samples_to_file_test.tests = {
},
}
+from tx_waveforms_test import uhd_tx_waveforms_test
+uhd_tx_waveforms_test.tests = {
+ 'chan0': {
+ 'chan': '0',
+ },
+ 'chan1': {
+ 'chan': '0',
+ },
+ 'both_chans': {
+ 'chan': '0,1',
+ },
+}
+
from tx_bursts_test import uhd_tx_bursts_test
from test_pps_test import uhd_test_pps_test
diff --git a/host/tests/devtest/devtest_n3x0.py b/host/tests/devtest/devtest_n3x0.py
index 6ddf3d338..6a8f9d434 100644
--- a/host/tests/devtest/devtest_n3x0.py
+++ b/host/tests/devtest/devtest_n3x0.py
@@ -48,6 +48,19 @@ uhd_benchmark_rate_test.tests = {
},
}
+from tx_waveforms_test import uhd_tx_waveforms_test
+uhd_tx_waveforms_test.tests = {
+ 'chan0': {
+ 'chan': '0',
+ },
+ 'chan1': {
+ 'chan': '0',
+ },
+ 'both_chans': {
+ 'chan': '0,1',
+ },
+}
+
from rx_samples_to_file_test import rx_samples_to_file_test
from tx_bursts_test import uhd_tx_bursts_test
from test_pps_test import uhd_test_pps_test
diff --git a/host/tests/devtest/devtest_x3x0.py b/host/tests/devtest/devtest_x3x0.py
index 10e56db5b..c928d793d 100755
--- a/host/tests/devtest/devtest_x3x0.py
+++ b/host/tests/devtest/devtest_x3x0.py
@@ -48,6 +48,19 @@ uhd_benchmark_rate_test.tests = {
},
}
+from tx_waveforms_test import uhd_tx_waveforms_test
+uhd_tx_waveforms_test.tests = {
+ 'chan0': {
+ 'chan': '0',
+ },
+ 'chan1': {
+ 'chan': '0',
+ },
+ 'both_chans': {
+ 'chan': '0,1',
+ },
+}
+
from rx_samples_to_file_test import rx_samples_to_file_test
from tx_bursts_test import uhd_tx_bursts_test
from test_pps_test import uhd_test_pps_test
diff --git a/host/tests/devtest/tx_waveforms_test.py b/host/tests/devtest/tx_waveforms_test.py
new file mode 100644
index 000000000..5a07fbe84
--- /dev/null
+++ b/host/tests/devtest/tx_waveforms_test.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+#
+# Copyright 2019 Ettus Research, a National Instruments Brand
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+""" Test using tx_waveforms """
+
+import re
+from uhd_test_base import uhd_example_test_case
+
+class uhd_tx_waveforms_test(uhd_example_test_case):
+ """
+ Run benchmark_rate in various configurations.
+ """
+ tests = {}
+
+ def setup_example(self):
+ """
+ Set args.
+ """
+ self.test_params = uhd_tx_waveforms_test.tests
+
+ def run_test(self, test_name, test_args):
+ """
+ Runs tx_waveforms with the given parameters. Parses output and writes
+ results to file.
+ """
+ samp_rate = test_args.get('rate', 1e6)
+ nsamps = test_args.get('nsamps', '1000000')
+ chan = test_args.get('chan', '0')
+ freq = test_args.get('freq', '0')
+ self.log.info('Running test %s, Channel = %s, Sample Rate = %f',
+ test_name, chan, samp_rate)
+ args = [
+ self.create_addr_args_str(),
+ '--nsamps', str(nsamps),
+ '--channels', str(chan),
+ '--freq', str(freq),
+ '--rate', str(samp_rate),
+ ]
+ (app, run_results) = self.run_example('tx_waveforms', args)
+ # This only works if UHD_LOG_FASTPATH_DISABLE==0, which is usually not
+ # the case. But we leave it in here just in case.
+ run_results['num_late'] = int(len(re.findall(r'LLL', app.stderr)) * 3)
+ run_results['passed'] = all([
+ run_results['return_code'] == 0,
+ run_results['num_late'] == 0,
+
+ ])
+ self.report_example_results(test_name, run_results)
+ return run_results
+