Lines Matching full:testplan
20 from twisterlib.testplan import TestPlan, change_skip_to_error_if_integration
58 """ Testing add_configurations function of TestPlan class in Twister
62 plan = TestPlan(class_env)
74 """ Testing get_all_testsuites function of TestPlan class in Twister """
95 """ Testing get_platforms function of TestPlan class in Twister """
124 """ Testing apply_filters function of TestPlan class in Twister
202 """ Testing apply_filters function of TestPlan class in Twister
235 """ Testing apply_filters function of TestPlan class in Twister
255 """ Testing add_instances() function of TestPlan class in Twister
262 plan = TestPlan(class_env)
378 """ Testing required_snippets function of TestPlan class in Twister """
405 testplan = TestPlan(env=mock.Mock())
412 testplan.levels.append(lvl1)
413 testplan.levels.append(lvl2)
414 testplan.levels.append(lvl3)
418 res = testplan.get_level(name)
421 res = testplan.get_level(name)
426 res = testplan.get_level('missed_lvl')
429 testplan.levels.remove(lvl1)
430 testplan.levels.remove(lvl2)
432 res = testplan.get_level(name)
465 testplan = TestPlan(env=mock.Mock())
466 testplan.scenarios = ['sc1', 'sc1-1', 'sc1-2', 'sc2']
473 testplan.parse_configuration(tmp_config_file)
475 if not testplan.levels:
477 for level in testplan.levels:
498 testplan = TestPlan(env=mock.Mock())
499 testplan.options = mock.Mock(sub_test=sub_tests)
500 testplan.run_individual_testsuite = []
501 testplan.testsuites = {
516 testplan.testsuites['ts1'].name = 'ts1'
517 testplan.testsuites['ts1'].testcases[0].name = 'ts1.tc1'
518 testplan.testsuites['ts1'].testcases[1].name = 'ts1.tc2'
519 testplan.testsuites['ts2'].name = 'ts2'
520 testplan.testsuites['ts2'].testcases[0].name = 'ts2.tc1'
521 testplan.testsuites['ts2'].testcases[1].name = 'ts2.tc2'
522 testplan.testsuites['ts2'].testcases[2].name = 'ts2.tc3'
525 testplan.find_subtests()
564 testplan = TestPlan(env=mock.Mock())
565 testplan.options = mock.Mock(
570 testplan.testsuites = {
574 testplan.run_individual_testsuite = 'ts0'
575 testplan.load_errors = load_errors
576 testplan.add_testsuites = mock.Mock(return_value=added_testsuite_count)
577 testplan.find_subtests = mock.Mock()
578 testplan.report_duplicates = mock.Mock()
579 testplan.parse_configuration = mock.Mock()
580 testplan.add_configurations = mock.Mock()
583 testplan.discover()
585 testplan.add_testsuites.assert_called_once_with(testsuite_filter='ts1')
716 testplan = TestPlan(env=mock.Mock(outdir=tmp_path))
717 testplan.testsuites = {
721 testplan.testsuites['ts1'].name = 'ts1'
722 testplan.testsuites['ts2'].name = 'ts2'
723 testplan.options = mock.Mock(
738 testplan.platforms=[mock.Mock(), mock.Mock(), mock.Mock(), mock.Mock(),
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'
777 testplan.generate_subset = mock.Mock()
778 testplan.apply_filters = mock.Mock()
783 testplan.load()
785 assert testplan.selected_platforms == expected_selected_platforms
787 testplan.generate_subset.assert_called_once_with(*expected_generate_subset_args)
789 testplan.generate_subset.assert_not_called()
829 testplan = TestPlan(env=mock.Mock())
830 testplan.options = mock.Mock(
835 testplan.instances = {
846 testplan.generate_subset(subset, sets)
848 assert [instance for instance in testplan.instances.keys()] == \
853 testplan = TestPlan(env=mock.Mock())
858 with mock.patch('twisterlib.testplan.parse_modules', return_value=modules):
859 testplan.handle_modules()
861 assert testplan.modules == ['name1', 'name2']
889 testplan = TestPlan(env=mock.Mock())
890 testplan.report_test_tree = mock.Mock()
891 testplan.report_test_list = mock.Mock()
892 testplan.report_tag_list = mock.Mock()
894 testplan.options = mock.Mock(
900 res = testplan.report()
907 getattr(testplan, expected_method).assert_called_once()
909 getattr(testplan, method).assert_not_called()
964 testplan = TestPlan(env=mock.Mock())
965 testplan.scenarios = [scenario for testsuite in testsuites \
967 testplan.get_testsuite = mock.Mock(side_effect=mock_get)
971 testplan.report_duplicates()
980 testplan = TestPlan(env=mock.Mock())
981 testplan.testsuites = {
988 testplan.report_tag_list()
1001 testplan = TestPlan(env=mock.Mock())
1002 testplan.get_tests_list = mock.Mock(
1013 testplan.report_test_tree()
1059 testplan = TestPlan(env=mock.Mock())
1060 testplan.get_tests_list = mock.Mock(
1068 testplan.report_test_list()
1088 TestPlan.info('dummy text')
1115 testplan = TestPlan(env=env)
1117 testplan.test_config = {
1139 with mock.patch('twisterlib.testplan.generate_platforms', mock_gen_plat):
1140 testplan.add_configurations()
1144 print(testplan.default_platforms)
1145 assert sorted(expected_defaults) == sorted(testplan.default_platforms)
1148 print(testplan.platform_names)
1149 platform_names = [p.name for p in testplan.platforms]
1154 testplan = TestPlan(env=mock.Mock())
1167 testplan.testsuites = {
1172 res = testplan.get_all_tests()
1312 testplan = TestPlan(env=env)
1314 res = testplan.add_testsuites(testsuite_filter)
1317 assert testplan.load_errors == expected_errors
1321 testplan = TestPlan(env=mock.Mock())
1322 testplan.name = 'my name'
1324 res = testplan.__str__()
1340 testplan = TestPlan(env=mock.Mock())
1347 testplan.platforms = [p1, p2]
1349 res = testplan.get_platform(name)
1398 testplan = TestPlan(env=mock.Mock(outdir=os.path.join('out', 'dir')))
1399 testplan.options = mock.Mock(device_testing=device_testing, test_only=True, report_summary=None)
1400 testplan.testsuites = {
1408 testplan.get_platform = mock.Mock(side_effect=get_platform)
1505 testplan.load_from_file('dummy.yaml', filter_platform)
1585 for n, i in testplan.instances.items():
1606 testplan = TestPlan(env=mock.Mock())
1613 testplan.add_instances(instance_list)
1615 assert testplan.instances == {
1622 testplan = TestPlan(env=mock.Mock())
1623 testplan.testsuites = {
1630 testplan.testsuites['test1.suite0'].testcases[0].name = 'test1.suite0.case0'
1631 testplan.testsuites['test1.suite0'].testcases[1].name = 'test1.suite0.case1'
1633 testplan.testsuites['test1.suite1'].testcases[0].name = 'test1.suite1.case0'
1634 … testplan.testsuites['test1.suite1'].testcases[1].name = 'test1.suite1.case0' # in suite duplicate
1636 testplan.testsuites['test1.suite2'].testcases[0].name = 'test1.suite2.case0'
1637 …testplan.testsuites['test1.suite2'].testcases[1].name = 'test1.suite1.case0' # out suite duplicate
1641 res = testplan.get_testcase(id)
1644 assert testplan.testsuites['test1.suite1'] in res
1645 assert testplan.testsuites['test1.suite2'] in res
1649 testplan = TestPlan(env=mock.Mock())
1650 testplan.platform_names = ['a platform', 'other platform']
1656 testplan.verify_platforms_existence(platform_names, log_info)
1687 testplan = TestPlan(env=mock.Mock(outdir=outdir))
1688 testplan._create_build_dir_link = mock.Mock(side_effect=mock_link)
1689 testplan.instances = instances
1693 testplan.create_build_dir_links()
1734 testplan = TestPlan(env=mock.Mock())
1738 testplan._create_build_dir_link(links_dir_path, instance)
1741 assert testplan.link_dir_counter == 1