uhd/host/tests/devtest
2016-12-09 19:15:27 -08:00
..
benchmark_rate_test.py devtest: dont check number of samples in benchmark rate test and accept 2016-12-01 12:44:41 -08:00
bitbang_test.py tests: Added bitbang test, added to x3x0 devtest 2016-12-09 19:15:27 -08:00
CMakeLists.txt tests: More devtests, works on E3XX now 2015-11-11 10:37:26 -08:00
devtest_b2xx.py devtest: Fixed case where B200 test could fail due to bad params 2016-03-25 14:50:27 -07:00
devtest_e3xx.py tests: More devtests, works on E3XX now 2015-11-11 10:37:26 -08:00
devtest_x3x0.py tests: Added bitbang test, added to x3x0 devtest 2016-12-09 19:15:27 -08:00
gpio_test.py tests: Added bitbang test, added to x3x0 devtest 2016-12-09 19:15:27 -08:00
README.md tests: Added first batch of device tests 2015-10-07 15:06:42 -07:00
run_testsuite.py devtest: flush stdout after print statements 2016-12-01 12:44:41 -08:00
rx_samples_to_file_test.py tests: Added first batch of device tests 2015-10-07 15:06:42 -07:00
test_messages_test.py tests: Added first batch of device tests 2015-10-07 15:06:42 -07:00
test_pps_test.py tests: More devtests, works on E3XX now 2015-11-11 10:37:26 -08:00
tx_bursts_test.py tests: Added first batch of device tests 2015-10-07 15:06:42 -07:00
uhd_test_base.py devtest: dont check number of samples in benchmark rate test and accept 2016-12-01 12:44:41 -08:00
usrp_probe.py devtest: Fix $PATH-setting code 2016-05-09 10:36:36 -07:00
usrp_probe_test.py tests: More devtests, works on E3XX now 2015-11-11 10:37:26 -08: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.