Commit graph

67 commits

Author SHA1 Message Date
Steven Koo
2da3cdcb3b devtest: Support multi_usrp_test on Windows
Windows requires the command 'python' to prepend calls to .py files.
This change moves the path to multi_usrp_test.py to an argument on
Windows.
2020-08-10 15:14:36 -05:00
Steven Koo
31cade6566 devtest: Update filter for e31x devices
Filter for e3x0 no longer matches e31x devices. Switch to e3xx.
2020-08-04 15:47:33 -05:00
Martin Braun
e4291f1ddc multi_usrp: Add get_radio_control() API call
This is an advanced API call that allows direct underlying
access to the radio_control object for RFNoC devices.
2020-07-16 15:17:26 -05:00
Martin Braun
f832a176d9 devtest: Assert result of python_api_test correctly
Before this, the python_api_test didn't assert an error when it failed.
2020-06-10 12:46:33 -05:00
Martin Braun
6db281792b devtest: Don't skip Python API tests if Python API is enabled
One of the devtests (the python_api_test) gets skipped without failures
if the uhd module can't be loaded. However, this can mask errors if the
uhd module can't be loaded because it's broken. This change will verify
if the uhd module should have been loaded, and throw an error if that's
the case.
2020-06-10 12:46:33 -05:00
Martin Braun
f04d109936 b200: tests: Fix PyLint issues in B200 devtest 2020-06-10 12:46:33 -05:00
Martin Braun
ffb9187944 tests: Fix multi_usrp_test
This is a test that automatically executes API calls. The following
tests were broken:
- clock source: On B200mini, we need to set the time source back to
  internal to test the clock source.
- The filter API call tests did not match the API calls themselves
2020-06-10 12:46:33 -05:00
Matthew Crymble
6810cf2a4c tests: updated devtest runner to use standard device args
This will allow run_testsuite.py to be called for specific devices instead
of all devices for a certain type.
2020-05-27 09:46:01 -05:00
Martin Braun
1eecf8cf53 tests: Remove 'six' dependency from devtest
This removes 'six' as a dependency for devtest.
2020-05-12 12:04:11 -05:00
Martin Braun
1bba62a75a Remove remaining Python 2 references
This changes two things in all applicable files:
- Remove imports from __future__
- Change default shebangs from /usr/bin/env python to /usr/bin/env
  python3
2020-05-07 15:10:41 -05:00
Michael West
b8b1d28d14 test: Add output for gpio_test
Print output from stdout and stderr upon error.

Signed-off-by: Michael West <michael.west@ettus.com>
2020-04-30 15:14:28 -05:00
Michael West
022cfa3d80 devtest: Add support for TwinRX to x3x0
Adding necessary code to examine number of TX and RX channels and adjust
test cases accordingly.

Signed-off-by: Michael West <michael.west@ettus.com>
2020-04-30 15:14:28 -05:00
Michael West
8d5bcddd0d devtest: Add method to get number of channels
Adding method to get number of TX and RX channels to usrp_probe.

Signed-off-by: Michael West <michael.west@ettus.com>
2020-04-30 15:14:28 -05:00
Michael West
09f3d17f5c devtest: Fix benchmark_rate_test success criteria
Allow success if testing either TX or RX.  Previously required both TX
and RX to be tested simultaneously.

Signed-off-by: Michael West <michael.west@ettus.com>
2020-04-30 15:14:28 -05:00
Ciro Nishiguchi
ff17d7428b devtest: add missing devtest to n3xx 2020-04-03 07:33:22 -05:00
Martin Braun
879f021a02 devtest: Add test_messages_test to X310
- Fixes issues with test_messages_test (it had inverted the pass/fail
  condition)
- Improve Pylint scores in affected files
2019-11-26 12:21:33 -08:00
Martin Braun
e0a40fd1d7 devtest: Use with() statement to open files
This fixes warnings such as this during devtest:

/home/mbr0wn/src/uhddev/host/tests/devtest/uhd_test_base.py:112:
ResourceWarning: unclosed file <_io.TextIOWrapper
name='./results_x300_F457AD.log' mode='r' encoding='UTF-8'>
  self.results = yaml.safe_load(open(self.results_file).read()) or {}
  /path/to/uhd/host/tests/devtest/uhd_test_base.py:150:
  ResourceWarning: unclosed file <_io.TextIOWrapper
  name='./results_x300_F457AD.log' mode='w' encoding='UTF-8'>
    yaml.dump(self.results, default_flow_style=False))
    ok
2019-11-26 12:21:33 -08:00
Brent Stapleton
41f142050f tests: Change Python YAML module
Use Python's `ruamel.yaml` module instead of `yaml`
2019-11-26 12:21:32 -08:00
Martin Braun
c256b9df65 x300/mpmd: Port all RFNoC devices to the new RFNoC framework
Co-Authored-By: Alex Williams <alex.williams@ni.com>
Co-Authored-By: Sugandha Gupta <sugandha.gupta@ettus.com>
Co-Authored-By: Brent Stapleton <brent.stapleton@ettus.com>
Co-Authored-By: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
2019-11-26 12:16:25 -08:00
Martin Braun
2ed94af772 uhd: Remove deprecated objects and methods
This removes the following symbols:
- otw_type_t
- clock_config_t
- Any functions that use those symbols
- Non-standard args from examples (e.g., --total-time is deprecated in
  favour of --duration)
2019-11-26 11:49:08 -08:00
Martin Braun
21ed72b5a2 devtese: Change default Python interpreter to 3
Usually, devtest is run via make (or ninja), and will use the correct
Python interpreter. When running directly on the command line, it is
important to pick the right Python interpreter so it will work with the
Python API.

Here, we change the default interpreter from Python 2 to 3, because
that's the more common version, and will be the only option for upcoming
UHD 4.0 anyway.
2019-11-08 08:56:20 -08:00
erickshepherdNI
fb71222b31 e3xx: corrected frontend name in devtest 2019-10-28 13:40:19 -07:00
Martin Braun
8081105e24 devtest: Add new test for tx_waveforms
This will run tx_waveforms with a few settings.
2019-05-22 14:27:02 -07:00
Martin Braun
600f655e8e tests: Make the Python interpreter for devtests a parameter
When running 'make test_***', it now also defaults to
RUNTIME_PYTHON_EXECUTABLE.
2019-04-25 10:46:44 -07:00
Brent Stapleton
431deb855b uhd: mpm: update all license header w/ "-or-later"
Updating all SPDX license identifiers to include "-or-later"
2019-03-08 00:43:07 +01:00
Trung Tran
3f77f6d5e0 devtest: add universal_newlines to subprocess call
subprocess call in python3+ return stderr and stdout object is byte
object instead of text. This caused many issue with parsing the ouput in
devtest. These are not an issue in python2. This change will make
devtest more python3 compatible.

Signed-off-by: Trung.Tran<trung.tran@ettus.com>
2019-01-23 11:03:39 -08:00
Trung Tran
c6618dd8d3 tests: replace has_key by using 'in'
python3+ dropped has_key function on dictionary. In order to make it
compatible, we need to use 'in' keyword.

Signed-off-by: Trung.Tran<trung.tran@ettus.com>
2019-01-23 11:03:39 -08:00
Brent Stapleton
494c7338d7 devtest: Fix CMake endif warning
When adding E320 devtests, the `endif` clause had the wrong argument,
which resulted in a CMake warning.
2019-01-03 12:11:06 -08:00
Sugandha Gupta
027040752f devtest: x3x0: Enable rx_samples_to_file in devtest 2018-12-17 14:24:13 -08:00
Martin Braun
2e85508a87 cmake: Properly register devtest
If N300 or E320 is disabled, the appropriate devtests are no longer
registered.
2018-11-29 09:55:08 -08:00
Martin Braun
a69ab0c23a cmake: Update coding style to use lowercase commands
Also updates our coding style file.

Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code (with GNU compliant sed):

cmake --help-command-list | grep -v "cmake version" | while read c; do
  echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done > convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \
'*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed

(Make sure the backslashes don't get mangled!)
2018-11-14 14:10:09 -08:00
Sugandha Gupta
167be53183 e320: devtest: Reduce sample rate for 1G devtest
The E320 default master clock rate is 16MHz, therefore we need to
reduce the 2 channel receive rate to 8MHz in order to be able to meet
the requested rate.
2018-09-26 14:10:23 -07:00
Sugandha Gupta
e16e046d43 devtest: n3x0: Enable rx_samples_to_file test 2018-09-14 16:34:51 -07:00
Sugandha Gupta
fbd51d33e9 devtest: e320: Re-enable rx_samples_to_file test
The test has been fixed in commit 9c7d251b32
to parse for D and S correctly
2018-09-12 12:10:39 -07:00
Sugandha Gupta
94d6a6a0a6 e320: gpio: Fix front panel GPIO readback
The gpio devtest passes after this fix. Enabling the test
2018-09-12 12:10:39 -07:00
Martin Braun
6849514a05 devtest: Improve error handling for shell_application 2018-08-22 18:37:12 -07:00
Martin Braun
35a74c8c80 devtest: b2xx: Fix some arguments for MIMO test 2018-08-22 18:37:12 -07:00
Martin Braun
2b15ecde2b devtest: Fix counting of underruns/overruns
Our regex was borked.
2018-08-22 18:37:12 -07:00
Martin Braun
9c7d251b32 devtest: Remove parsing for DD.. and SS..
Detecting drops by parsing for DD and SS was a flawed method. Tools
should find those programmatically. Plus, the string 'DDC' would
interfere with the regex. Also, we're now using
UHD_LOG_FASTPATH_DISABLE.
2018-08-22 18:37:12 -07:00
Martin Braun
21d7250849 devtest: Default UHD_LOG_FASTPATH_DISABLE to 1 2018-08-22 18:37:12 -07:00
Martin Braun
19042c32b8 devtest: Clean up & refactor
- Move filter_* functions out of uhd_test_case
- Reduced some line lengths
2018-08-22 18:37:12 -07:00
Vidush
5b55a32c92 devtest: Integrate Python API Tester into Devtest 2018-08-10 11:42:47 -07:00
Martin Braun
318e406b6f devtest: Add more env vars, make Py3k compatible
The testsuite now includes more environment variables for source dir,
build dir, and PYTHONPATH.
2018-08-10 11:42:47 -07:00
Sugandha Gupta
f25e0e41f8 e320: Enable devtest for E320
- All tests pass except for gpio_test
2018-08-09 17:39:14 -07:00
Vidush
dd9cc213ca tests: Add multi_usrp_test.py
This is an API tester that uses the Python API to verify the correct
behaviour of multi_usrp with respect to a hardware implementation.
2018-07-24 14:10:13 -07:00
Martin Braun
09d7e9c4de devtest: Minor Python fixes
- Fix some Pylint warnings
- Improve output
2018-07-17 08:50:41 -07:00
Trung N Tran
c52c0b69fc dev_test: add N3xx devtest 2018-05-02 12:02:43 -07:00
Trung N Tran
181065f4ff dev_test: usrp_prope.py update to find reachable mpm device 2018-05-02 12:02:43 -07:00
Martin Braun
edd624e903 examples: Update benchmark_rate (more stats, timestamps)
- Messages are all timestamped, enables better understanding of the
  output log
- Less usage of Boost
- More stats (differentiate between RX and TX timeouts and sequence
  errors)
2018-03-14 15:18:00 -07:00
Martin Braun
49734e4fdb devtest: Add list_sensors test 2018-02-27 10:03:37 -08:00