• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

pytest_integration/22-Aug-2025-

test_data/22-Aug-2025-

README.md A D22-Aug-20251.8 KiB5837

conftest.py A D22-Aug-20254 KiB9980

test_cmakecache.py A D22-Aug-20257.1 KiB273215

test_config_parser.py A D22-Aug-20256.5 KiB202159

test_environment.py A D22-Aug-202516.3 KiB583494

test_errors.py A D22-Aug-2025904 3621

test_handlers.py A D22-Aug-202561.9 KiB2,0541,750

test_hardwaremap.py A D22-Aug-202519.9 KiB738659

test_harness.py A D22-Aug-202538 KiB1,2381,047

test_jobserver.py A D22-Aug-202512.9 KiB456362

test_log_helper.py A D22-Aug-2025982 4227

test_mixins.py A D22-Aug-2025359 209

test_platform.py A D22-Aug-202512.6 KiB495442

test_quarantine.py A D22-Aug-20257 KiB275246

test_runner.py A D22-Aug-202585.9 KiB2,8572,537

test_scl.py A D22-Aug-20257.8 KiB257198

test_testinstance.py A D22-Aug-202525 KiB689556

test_testplan.py A D22-Aug-202561.6 KiB1,7981,561

test_testsuite.py A D22-Aug-202524.4 KiB908739

test_twister.py A D22-Aug-20254.4 KiB10672

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