Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
pytest_integration/ | 03-Apr-2024 | - | 292 | 250 | ||
test_data/ | 03-Apr-2024 | - | 288 | 218 | ||
README.md | D | 03-Apr-2024 | 1.7 KiB | 58 | 37 | |
conftest.py | D | 03-Apr-2024 | 3.7 KiB | 97 | 77 | |
test_cmakecache.py | D | 03-Apr-2024 | 6.8 KiB | 273 | 215 | |
test_environment.py | D | 03-Apr-2024 | 14.9 KiB | 560 | 477 | |
test_errors.py | D | 03-Apr-2024 | 516 | 23 | 13 | |
test_handlers.py | D | 03-Apr-2024 | 58.2 KiB | 2,062 | 1,743 | |
test_hardwaremap.py | D | 03-Apr-2024 | 18.6 KiB | 723 | 645 | |
test_harness.py | D | 03-Apr-2024 | 23.6 KiB | 738 | 585 | |
test_jobserver.py | D | 03-Apr-2024 | 12.2 KiB | 458 | 365 | |
test_log_helper.py | D | 03-Apr-2024 | 927 | 42 | 27 | |
test_mixins.py | D | 03-Apr-2024 | 339 | 19 | 9 | |
test_platform.py | D | 03-Apr-2024 | 3.1 KiB | 130 | 116 | |
test_quarantine.py | D | 03-Apr-2024 | 6.8 KiB | 275 | 246 | |
test_runner.py | D | 03-Apr-2024 | 75.4 KiB | 2,690 | 2,372 | |
test_scl.py | D | 03-Apr-2024 | 7.6 KiB | 257 | 198 | |
test_testinstance.py | D | 03-Apr-2024 | 20.9 KiB | 596 | 475 | |
test_testplan.py | D | 03-Apr-2024 | 55.9 KiB | 1,782 | 1,524 | |
test_testsuite.py | D | 03-Apr-2024 | 23 KiB | 889 | 725 | |
test_twister.py | D | 03-Apr-2024 | 3.7 KiB | 94 | 62 |
README.md
1# Twister Testing 2 3Running the tests require the environment variable ZEPHYR_BASE to be set. 4 5Twister Testsuite are located in $ZEPHYR_BASE/scripts/tests directory with all the data files in $ZEPHYR_BASE/scripts/test_data directory. 6 7## Dependencies 8 9Install all the dependencies using 10 11``` 12pip install -r $ZEPHYR_BASE/scripts/requirements-build-test.txt 13``` 14 15## Executing testsuite 16 17The testcases can be executed from the root directory using 18 19``` 20pytest $ZEPHYR_BASE/scripts/tests/twister 21``` 22 23## Twister Coverage 24 25The coverage for all the tests can be run using the command below. This will collect all the tests available. 26 27```bash 28coverage run -m pytest $ZEPHYR_BASE/scripts/tests/twister/ 29``` 30 31Then we can generate the coverage report for just twister script using 32 33```bash 34coverage report -m $ZEPHYR_BASE/scripts/pylib/twister/ 35``` 36 37To generate the coverage report for twister script use below command 38 39```bash 40coverage report -m $ZEPHYR_BASE/scripts/twister 41``` 42 43The html coverage report for twister can be generated using 44 45```bash 46coverage html twister 47``` 48 49If needed,the full coverage html report can be generated in every run of "pytest" in the tests directory using configuration file (setup.cfg). 50 51## Organization of tests 52 53- conftest.py: Contains common fixtures for use in testing the twister tool. 54- test_twister.py : Contains basic testcases for environment variables, verifying testcase & platform schema's. 55- test_testsuite_class.py : Contains testcases for Testsuite class (except reporting functionality) in twisterlib.py. 56- test_testinstance.py : Contains testcases for Testinstance and Testcase class. 57- test_reporting_testsuite.py : Contains testcases for reporting functionality of Testsuite class of twister. 58