1# Device Tests
2
3These are a set of tests to be run with one or more attached devices.
4None of these tests require special configuration; e.g., the X3x0 test
5will work regardless of attached daughterboards, FPGIO wiring etc.
6
7## Adding new tests
8
9To add new tests, add new files with classes that derive from unittest.TestCase.
10Most of the time, you'll want to derive from `uhd_test_case` or
11`uhd_example_test_case`.
12
13## Adding new devices
14
15To add new devices, follow these steps:
16
171) Add an entry to the CMakeLists.txt file in this directory using the
18   `ADD_DEVTEST()` macro.
192) Add a `devtest_pattern.py` file to this directory, where `pattern` is
20   the same pattern used in the `ADD_DEVTEST()` macro.
213) Edit this devtest file to import all the tests you want to run. Some
22   may require parameterization.
23
24The devtest file is 'executed' using Python's unittest module, so it doesn't
25require any actual commands. If the device needs special initialization,
26commands inside this file will be executed *if* they are *not* in a
27`if __name__ == "__main__"` conditional.
28
29