Commit graph

20 commits

Author SHA1 Message Date
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
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
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
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
Martin Braun
6849514a05 devtest: Improve error handling for shell_application 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
Martin Braun
09d7e9c4de devtest: Minor Python fixes
- Fix some Pylint warnings
- Improve output
2018-07-17 08:50:41 -07:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Trung N Tran
9ec36e9538 RTS: DevTest failure work around by increasing time between test 2017-06-02 16:18:17 -07:00
Andrej Rode
d5d3e5a7cc tests: devtest:remove wait for claimer 2017-02-08 20:10:24 -08:00
Andrej Rode
7fc01d5fe3 devtest: dont check number of samples in benchmark rate test and accept
10 underruns in SISO
2016-12-01 12:44:41 -08:00
Andrej Rode
b68412521f devtest: test_base add wait time between uhd_usrp_probe calls 2016-11-09 17:54:52 -08:00
Nicholas Corgan
f50f46b817 devtest: fixed check for specific product 2016-03-25 12:36:42 -07:00
Martin Braun
90b88a27d2 tests: Added first batch of device tests
- Currently supported: B2xx, X3x0
- Runs some simple examples
2015-10-07 15:06:42 -07:00