uhd/host/tests/devtest
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
..
benchmark_rate_test.py devtest: Fix counting of underruns/overruns 2018-08-22 18:37:12 -07:00
bitbang_test.py uhd: Update license headers 2018-02-19 16:54:52 -08:00
CMakeLists.txt devtest: Fix CMake endif warning 2019-01-03 12:11:06 -08:00
devtest_b2xx.py devtest: b2xx: Fix some arguments for MIMO test 2018-08-22 18:37:12 -07:00
devtest_e3xx.py test: devtest: devtest_e3xx.py: Fix copy & paste error 2018-02-26 15:39:33 -08:00
devtest_e320.py e320: devtest: Reduce sample rate for 1G devtest 2018-09-26 14:10:23 -07:00
devtest_n3x0.py devtest: n3x0: Enable rx_samples_to_file test 2018-09-14 16:34:51 -07:00
devtest_x3x0.py devtest: x3x0: Enable rx_samples_to_file in devtest 2018-12-17 14:24:13 -08:00
gpio_test.py uhd: Update license headers 2018-02-19 16:54:52 -08:00
list_sensors_test.py devtest: Add list_sensors test 2018-02-27 10:03:37 -08:00
multi_usrp_test.py devtest: Integrate Python API Tester into Devtest 2018-08-10 11:42:47 -07:00
python_api_test.py devtest: Integrate Python API Tester into Devtest 2018-08-10 11:42:47 -07:00
README.md tests: Added first batch of device tests 2015-10-07 15:06:42 -07:00
run_testsuite.py devtest: add universal_newlines to subprocess call 2019-01-23 11:03:39 -08:00
rx_samples_to_file_test.py tests: replace has_key by using 'in' 2019-01-23 11:03:39 -08:00
test_messages_test.py tests: replace has_key by using 'in' 2019-01-23 11:03:39 -08:00
test_pps_test.py tests: replace has_key by using 'in' 2019-01-23 11:03:39 -08:00
tx_bursts_test.py tests: replace has_key by using 'in' 2019-01-23 11:03:39 -08:00
uhd_test_base.py devtest: add universal_newlines to subprocess call 2019-01-23 11:03:39 -08:00
usrp_probe.py devtest: add universal_newlines to subprocess call 2019-01-23 11:03:39 -08:00
usrp_probe_test.py devtest: Integrate Python API Tester into Devtest 2018-08-10 11:42:47 -07:00

Device Tests

These are a set of tests to be run with one or more attached devices. None of these tests require special configuration; e.g., the X3x0 test will work regardless of attached daughterboards, FPGIO wiring etc.

Adding new tests

To add new tests, add new files with classes that derive from unittest.TestCase. Most of the time, you'll want to derive from uhd_test_case or uhd_example_test_case.

Adding new devices

To add new devices, follow these steps:

  1. Add an entry to the CMakeLists.txt file in this directory using the ADD_DEVTEST() macro.
  2. Add a devtest_pattern.py file to this directory, where pattern is the same pattern used in the ADD_DEVTEST() macro.
  3. Edit this devtest file to import all the tests you want to run. Some may require parameterization.

The devtest file is 'executed' using Python's unittest module, so it doesn't require any actual commands. If the device needs special initialization, commands inside this file will be executed if they are not in a if __name__ == "__main__" conditional.