Lines Matching +full:twister +full:- +full:out
2 # Copyright (c) 2020-2024 Intel Corporation
4 # SPDX-License-Identifier: Apache-2.0
7 This test file contains testsuites for testsuite.py module of twister
17 sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister"))
29 """ Testing add_testcase function of Testsuite class in twister """
35 tests_rel_dir = 'scripts/tests/twister/test_data/testsuites/tests/'
58 """ Testing add_configurations function of TestPlan class in Twister
74 """ Testing get_all_testsuites function of TestPlan class in Twister """
95 """ Testing get_platforms function of TestPlan class in Twister """
116 …(None, None, "supported_toolchains", ['gcc', 'xcc', 'xt-clang'], "Not supported by the toolchain"),
124 """ Testing apply_filters function of TestPlan class in Twister
193 …("run_individual_tests", ['scripts/tests/twister/test_data/testsuites/tests/test_a/test_a.check_1'…
202 """ Testing apply_filters function of TestPlan class in Twister
226 (20, 20, -1, 0),
227 (-2, -1, 10, 20),
235 """ Testing apply_filters function of TestPlan class in Twister
255 """ Testing add_instances() function of TestPlan class in Twister
277 …'demo_board_1/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_a/test_a.check_1' : 'a1…
278 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_a/test_a.check_1' : 'a1…
282 …'demo_board_2/unit_testing/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_a/test_a.c…
283 …'demo_board_1/unit_testing/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_d/test_d.c…
284 …'demo_board_3/unit_testing/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_d/test_d.c…
285 …'demo_board_2/unit_testing/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_d/test_d.c…
286 …'demo_board_2/unit_testing/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_c/test_c.c…
290 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_a/test_a.check_1' : 'al…
291 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_a/test_a.check_2' : 'al…
292 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_d/test_d.check_1' : 'al…
293 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_b/test_b.check_1' : 'al…
294 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_b/test_b.check_2' : 'al…
295 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_c/test_c.check_1' : 'al…
296 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_c/test_c.check_2' : 'al…
297 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_e/test_e.check_1' : 'al…
298 …'demo_board_3/zephyr/scripts/tests/twister/test_data/testsuites/tests/test_config/test_config.main…
326 """ Testing quarantine feature in Twister
358 (os.path.join('test_c', 'test_c.check_1'), ['cdc-acm-console'],
360 (os.path.join('test_d', 'test_d.check_1'), ['dummy', 'cdc-acm-console'],
378 """ Testing required_snippets function of TestPlan class in Twister """
380 testpath = os.path.join('scripts', 'tests', 'twister', 'test_data',
441 - name: lvl1
443 - sc1
444 - sc2
446 - name: lvl2
448 - sc1-1
449 - sc1-2
454 'lvl2': ['sc1-1', 'sc1-2', 'sc1', 'sc2']
466 testplan.scenarios = ['sc1', 'sc1-1', 'sc1-2', 'sc2']
484 (['ts2.tc2'], ['- ts2'], False),
527 out, err = capfd.readouterr()
528 sys.stdout.write(out)
531 assert all([printout in out for printout in expected_outs])
539 … (1, 0, ['qfile.yaml'], False, ['- platforms:\n - demo_board_3\n comment: "board_3"'], None, []),
593 TwisterRuntimeError, set(['t-p3', 't-p4', 't-p1', 't-p2']), []),
595 TwisterRuntimeError, set(['lt-p1', 'lt-p3', 'lt-p4', 'lt-p2']), []),
597 None, set(['ts-p4', 'ts-p2', 'ts-p1', 'ts-p3']), [2, 4]),
622 "platform": "t-p1",
628 "platform": "t-p2",
634 "platform": "t-p3",
640 "platform": "t-p4",
647 twister_file = tmp_path / 'twister.json'
655 "platform": "ts-p1",
661 "platform": "ts-p2",
667 "platform": "ts-p3",
673 "platform": "ts-p4",
688 "platform": "lt-p1",
694 "platform": "lt-p2",
700 "platform": "lt-p3",
706 "platform": "lt-p4",
730 exclude_platform=['t-p0', 't-p1',
731 'ts-p0', 'ts-p1',
732 'lt-p0', 'lt-p1'],
733 platform=['t-p1', 't-p2', 't-p3', 't-p4',
734 'ts-p1', 'ts-p2', 'ts-p3', 'ts-p4',
735 'lt-p1', 'lt-p2', 'lt-p3', 'lt-p4'],
741 testplan.platforms[0].name = 't-p1'
742 testplan.platforms[1].name = 't-p2'
743 testplan.platforms[2].name = 't-p3'
744 testplan.platforms[3].name = 't-p4'
745 testplan.platforms[4].name = 'ts-p1'
746 testplan.platforms[5].name = 'ts-p2'
747 testplan.platforms[6].name = 'ts-p3'
748 testplan.platforms[7].name = 'ts-p4'
749 testplan.platforms[8].name = 'lt-p1'
750 testplan.platforms[9].name = 'lt-p2'
751 testplan.platforms[10].name = 'lt-p3'
752 testplan.platforms[11].name = 'lt-p4'
753 testplan.platforms[0].aliases = ['t-p1']
754 testplan.platforms[1].aliases = ['t-p2']
755 testplan.platforms[2].aliases = ['t-p3']
756 testplan.platforms[3].aliases = ['t-p4']
757 testplan.platforms[4].aliases = ['ts-p1']
758 testplan.platforms[5].aliases = ['ts-p2']
759 testplan.platforms[6].aliases = ['ts-p3']
760 testplan.platforms[7].aliases = ['ts-p4']
761 testplan.platforms[8].aliases = ['lt-p1']
762 testplan.platforms[9].aliases = ['lt-p2']
763 testplan.platforms[10].aliases = ['lt-p3']
764 testplan.platforms[11].aliases = ['lt-p4']
765 testplan.platforms[0].normalized_name = 't-p1'
766 testplan.platforms[1].normalized_name = 't-p2'
767 testplan.platforms[2].normalized_name = 't-p3'
768 testplan.platforms[3].normalized_name = 't-p4'
769 testplan.platforms[4].normalized_name = 'ts-p1'
770 testplan.platforms[5].normalized_name = 'ts-p2'
771 testplan.platforms[6].normalized_name = 'ts-p3'
772 testplan.platforms[7].normalized_name = 'ts-p4'
773 testplan.platforms[8].normalized_name = 'lt-p1'
774 testplan.platforms[9].normalized_name = 'lt-p2'
775 testplan.platforms[10].normalized_name = 'lt-p3'
776 testplan.platforms[11].normalized_name = 'lt-p4'
816 ids=['subset 1', 'subset 1 out of 5', 'subset 2',
926 '- scenario1 found in:\n' \
927 ' - a.yaml\n' \
928 ' - b.yaml\n',
990 out,err = capfd.readouterr()
991 sys.stdout.write(out)
994 assert '- tag' in out
995 assert '- tag1' in out
996 assert '- tag2' in out
997 assert '- tag3' in out
1015 out,err = capfd.readouterr()
1016 sys.stdout.write(out)
1055 assert expected in out
1070 out,err = capfd.readouterr()
1071 sys.stdout.write(out)
1074 assert ' - 1.dummy.case.1\n' \
1075 ' - 1.dummy.case.2\n' \
1076 ' - 2.dummy.case.1\n' \
1077 ' - 2.dummy.case.2\n' \
1078 ' - 3.dummy.case.1\n' \
1079 ' - 3.dummy.case.2\n' \
1080 ' - 4.dummy.case.1\n' \
1081 ' - 4.dummy.case.2\n' \
1082 ' - 5.dummy.case.1\n' \
1083 ' - 5.dummy.case.2\n' \
1084 '10 total.' in out
1090 out, err = capfd.readouterr()
1091 sys.stdout.write(out)
1094 assert 'dummy text\n' in out
1130 mock.Mock(aliases=['p1e1/unit_testing', 'p1e1'], twister=False, default=False),
1131 mock.Mock(aliases=['p1e2/unit_testing', 'p1e2'], twister=True, default=False),
1132 mock.Mock(aliases=['p2/unit_testing', 'p2'], twister=True, default=True),
1133 mock.Mock(aliases=['p3/unit_testing', 'p3'], twister=True, default=True),
1208 # ├ tests <- test root
1219 # └ other_tests <- alternate test root
1257 - samples
1260 - samples
1263 - samples
1398 testplan = TestPlan(env=mock.Mock(outdir=os.path.join('out', 'dir')))
1637 …testplan.testsuites['test1.suite2'].testcases[1].name = 'test1.suite1.case0' # out suite duplicate
1659 assert 'PLATFORM ERROR - unrecognized platform - some platform'
1673 outdir = os.path.join('out', 'dir')