|
15 | 15 | import json |
16 | 16 |
|
17 | 17 | # pylint: disable=duplicate-code |
| 18 | +# pylint: disable=no-name-in-module |
18 | 19 | from conftest import ZEPHYR_BASE, TEST_DATA, testsuite_filename_mock |
19 | 20 | from twisterlib.testplan import TestPlan |
20 | 21 |
|
@@ -49,10 +50,15 @@ def test_quarantine_verify(self, out_path): |
49 | 50 |
|
50 | 51 | with open(os.path.join(out_path, 'testplan.json')) as f: |
51 | 52 | j = json.load(f) |
| 53 | + |
| 54 | + # Quarantine-verify "swaps" statuses. The ones that are in quarantine list |
| 55 | + # should no longer be quarantined, and the ones that are not in the list |
| 56 | + # should be quarantined. Remove "quarantined" tests from "verify" testplan |
| 57 | + # to count what should be verified. |
52 | 58 | filtered_j = [ |
53 | | - (ts['platform'], ts['name'], tc['identifier']) \ |
| 59 | + (ts['platform'], ts['name']) \ |
54 | 60 | for ts in j['testsuites'] \ |
55 | | - for tc in ts['testcases'] if 'reason' not in tc |
| 61 | + if ts['status'] != "skipped" |
56 | 62 | ] |
57 | 63 |
|
58 | 64 | assert str(sys_exit.value) == '0' |
@@ -89,26 +95,26 @@ def test_quarantine_list(self, capfd, out_path, test_path, test_platforms, quara |
89 | 95 | sys.stdout.write(out) |
90 | 96 | sys.stderr.write(err) |
91 | 97 |
|
92 | | - board1_match1 = re.search('agnostic/group2/dummy.agnostic.group2 FILTERED: Quarantine: test ' |
| 98 | + board1_match1 = re.search('agnostic/group2/dummy.agnostic.group2 SKIPPED: Quarantine: test ' |
93 | 99 | 'intel_adl_crb', err) |
94 | 100 | board1_match2 = re.search( |
95 | | - 'agnostic/group1/subgroup2/dummy.agnostic.group1.subgroup2 FILTERED: Quarantine: test ' |
| 101 | + 'agnostic/group1/subgroup2/dummy.agnostic.group1.subgroup2 SKIPPED: Quarantine: test ' |
96 | 102 | 'intel_adl_crb', |
97 | 103 | err) |
98 | 104 | qemu_64_match = re.search( |
99 | | - 'agnostic/group1/subgroup2/dummy.agnostic.group1.subgroup2 FILTERED: Quarantine: test ' |
| 105 | + 'agnostic/group1/subgroup2/dummy.agnostic.group1.subgroup2 SKIPPED: Quarantine: test ' |
100 | 106 | 'qemu_x86_64', |
101 | 107 | err) |
102 | 108 | all_platforms_match = re.search( |
103 | | - 'agnostic/group1/subgroup1/dummy.agnostic.group1.subgroup1 FILTERED: Quarantine: test ' |
| 109 | + 'agnostic/group1/subgroup1/dummy.agnostic.group1.subgroup1 SKIPPED: Quarantine: test ' |
104 | 110 | 'all platforms', |
105 | 111 | err) |
106 | 112 | all_platforms_match2 = re.search( |
107 | | - 'agnostic/group1/subgroup1/dummy.agnostic.group1.subgroup1 FILTERED: Quarantine: test ' |
| 113 | + 'agnostic/group1/subgroup1/dummy.agnostic.group1.subgroup1 SKIPPED: Quarantine: test ' |
108 | 114 | 'all platforms', |
109 | 115 | err) |
110 | 116 | all_platforms_match3 = re.search( |
111 | | - 'agnostic/group1/subgroup1/dummy.agnostic.group1.subgroup1 FILTERED: Quarantine: test ' |
| 117 | + 'agnostic/group1/subgroup1/dummy.agnostic.group1.subgroup1 SKIPPED: Quarantine: test ' |
112 | 118 | 'all platforms', |
113 | 119 | err) |
114 | 120 |
|
|
0 commit comments