uhd/host/tests/devtest
Martin Braun 8a33db6022 devtest: Make Python tests their own type of devtest
Like the example test, the Python-based test is now codified. The
"special sauce" for Python tests revolves around the fact that they
require the Python API, so we have to gracefully fail if the Python API
was never enabled, but hard-fail when the Python API is enabled, but not
working.

This creates a new type of devtest (UHDPythonTestCase) and moves
uhd_python_api_test over to the new type.
2021-05-10 15:02:24 -05:00
..
benchmark_rate_test.py devtest: Fix benchmark_rate_test success criteria 2020-04-30 15:14:28 -05:00
bitbang_test.py
CMakeLists.txt devtest: reapply allow extra device arguments when running devtests 2021-02-12 13:16:01 -08:00
devtest_b2xx.py b200: tests: Fix PyLint issues in B200 devtest 2020-06-10 12:46:33 -05:00
devtest_e3xx.py x300/mpmd: Port all RFNoC devices to the new RFNoC framework 2019-11-26 12:16:25 -08:00
devtest_e320.py devtest: Add new test for tx_waveforms 2019-05-22 14:27:02 -07:00
devtest_n3x0.py devtest: add missing devtest to n3xx 2020-04-03 07:33:22 -05:00
devtest_x3x0.py devtest: lower rate for rx_all_chans_fast test 2021-02-01 13:31:29 -06:00
gpio_test.py devtest: Make Python tests their own type of devtest 2021-05-10 15:02:24 -05:00
list_sensors_test.py
multi_usrp_test.py multi_usrp: Add get_mb_controller() API call 2020-09-24 15:16:45 -05:00
python_api_test.py devtest: Make Python tests their own type of devtest 2021-05-10 15:02:24 -05:00
README.md
run_testsuite.py devtest: reapply allow extra device arguments when running devtests 2021-02-12 13:16:01 -08:00
rx_samples_to_file_test.py devtese: Change default Python interpreter to 3 2019-11-08 08:56:20 -08:00
test_messages_test.py devtest: Add test_messages_test to X310 2019-11-26 12:21:33 -08:00
test_pps_test.py devtese: Change default Python interpreter to 3 2019-11-08 08:56:20 -08:00
tx_bursts_test.py devtese: Change default Python interpreter to 3 2019-11-08 08:56:20 -08:00
tx_waveforms_test.py devtese: Change default Python interpreter to 3 2019-11-08 08:56:20 -08:00
uhd_test_base.py devtest: Make Python tests their own type of devtest 2021-05-10 15:02:24 -05:00
usrp_probe.py Remove remaining Python 2 references 2020-05-07 15:10:41 -05:00
usrp_probe_test.py devtese: Change default Python interpreter to 3 2019-11-08 08:56:20 -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.