The HIL module tests are designed to regression test behavior for the following HIL modules:
- i2c
- i2s
- spi
- uart
No hardware is needed for these tests as they all run using the xsim
xcore simulator that is installed with the XTC Tools.
Install the Python dependencies into your virtual environment of choice, or host, by running:
$ python -m pip install -r requirements.txt
in the fwk_io/test directory.
Build and run all the tests with the following command:
$ ./run_tests.sh
Alternatively, you can build and run tests for a single HIL module (lib_i2c in the following example):
$ ./run_tests.sh lib_i2c
Alternatively, you can run tests for a single HIL module (lib_i2c in the following example):
$ pytest lib_i2c
Or, to run just one test (lib_i2c's basic_master in the following example):
$ pytest lib_i2c/test_basic_master.py::test_i2c_basic_master[400kbps-stop-SCL:1b,SDA:1b]