Merge ~raharper/curtin:fix/drop-disco-tests into curtin:master
- Git
- lp:~raharper/curtin
- fix/drop-disco-tests
- Merge into master
Status: | Merged |
---|---|
Approved by: | Ryan Harper |
Approved revision: | 82b0be2881af3c6b77acd2ae055fa4508ea63d9e |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~raharper/curtin:fix/drop-disco-tests |
Merge into: | curtin:master |
Diff against target: |
769 lines (+56/-209) 38 files modified
tests/vmtests/test_basic.py (+0/-8) tests/vmtests/test_basic_dasd.py (+0/-4) tests/vmtests/test_bcache_basic.py (+0/-4) tests/vmtests/test_bcache_bug1718699.py (+0/-4) tests/vmtests/test_bcache_ceph.py (+0/-4) tests/vmtests/test_bcache_partitions.py (+0/-4) tests/vmtests/test_fs_battery.py (+0/-4) tests/vmtests/test_iscsi.py (+0/-4) tests/vmtests/test_journald_reporter.py (+0/-4) tests/vmtests/test_lvm.py (+0/-4) tests/vmtests/test_lvm_iscsi.py (+0/-4) tests/vmtests/test_lvm_raid.py (+0/-4) tests/vmtests/test_mdadm_bcache.py (+0/-34) tests/vmtests/test_mdadm_iscsi.py (+0/-4) tests/vmtests/test_multipath.py (+0/-4) tests/vmtests/test_network.py (+0/-4) tests/vmtests/test_network_alias.py (+0/-4) tests/vmtests/test_network_bonding.py (+0/-4) tests/vmtests/test_network_bridging.py (+0/-4) tests/vmtests/test_network_ipv6.py (+0/-4) tests/vmtests/test_network_ipv6_static.py (+0/-4) tests/vmtests/test_network_ipv6_vlan.py (+0/-4) tests/vmtests/test_network_mtu.py (+0/-8) tests/vmtests/test_network_static.py (+0/-4) tests/vmtests/test_network_static_routes.py (+0/-5) tests/vmtests/test_network_vlan.py (+0/-4) tests/vmtests/test_nvme.py (+0/-8) tests/vmtests/test_pollinate_useragent.py (+0/-4) tests/vmtests/test_preserve.py (+0/-4) tests/vmtests/test_preserve_raid.py (+0/-4) tests/vmtests/test_raid5_bcache.py (+0/-4) tests/vmtests/test_reuse_raid_member.py (+0/-9) tests/vmtests/test_simple.py (+0/-14) tests/vmtests/test_uefi_basic.py (+0/-9) tests/vmtests/test_zfsroot.py (+0/-10) tools/remove-vmtest-release (+54/-0) tools/run-pep8 (+1/-0) tools/run-pyflakes (+1/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Paride Legovini | Approve | ||
Chad Smith | Approve | ||
Dan Watkins (community) | Needs Fixing | ||
Review via email: mp+378363@code.launchpad.net |
Commit message
vmtests: drop disco tests using a tool to automate the process
Remove disco tests, adding a new tool which can automate removal
of tests that match the release name.
Description of the change
Server Team CI bot (server-team-bot) wrote : | # |
Dan Watkins (oddbloke) wrote : | # |
Test removal looks good and I like the script, but I do have a few inline comments on it.
Chad Smith (chad.smith) wrote : | # |
A minor alternative for avoiding truncating a file beyond the last class definition.
Chad Smith (chad.smith) wrote : | # |
Also, looks like we probably want to not attempt to rewrite the file if no modifications took place
Here's a paste that takes some of Dan's comments and mine
- 00ba9f8... by Ryan Harper
-
tools/remove-
vmtest- release: refactor and rename tool Refactor remove-
vmtest- release with the following changes: - renamed to drop the trailing .py
- skip re-writing file if not modified
- ensure remaining content is not dropped after last class definition
removed
- Add argparsing with parameters --distro-release, --path
- Handle single file or directory (--path tests/vmtests)
- Use distro.title() to capitalize the first letter of release
- Add comments in the parsing logic
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:00ba9f8bce6
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Chad Smith (chad.smith) : | # |
Chad Smith (chad.smith) wrote : | # |
Approved and minor suggestion to drop one of the elif clauses
- 82b0be2... by Ryan Harper
-
remove-
vmtest- release: remove 'class' match case, fix calling clean-file
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:82b0be2881a
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Ryan Harper (raharper) wrote : | # |
Removed elif clause, and fixed calling clean_file() function. Verified this removes what we expect and is idempotent.
Preview Diff
1 | diff --git a/tests/vmtests/test_basic.py b/tests/vmtests/test_basic.py |
2 | index 5cab556..91c05db 100644 |
3 | --- a/tests/vmtests/test_basic.py |
4 | +++ b/tests/vmtests/test_basic.py |
5 | @@ -245,10 +245,6 @@ class BionicTestBasic(relbase.bionic, TestBasicAbs): |
6 | __test__ = True |
7 | |
8 | |
9 | -class DiscoTestBasic(relbase.disco, TestBasicAbs): |
10 | - __test__ = True |
11 | - |
12 | - |
13 | class EoanTestBasic(relbase.eoan, TestBasicAbs): |
14 | __test__ = True |
15 | |
16 | @@ -352,10 +348,6 @@ class BionicTestScsiBasic(relbase.bionic, TestBasicScsiAbs): |
17 | __test__ = True |
18 | |
19 | |
20 | -class DiscoTestScsiBasic(relbase.disco, TestBasicScsiAbs): |
21 | - __test__ = True |
22 | - |
23 | - |
24 | class EoanTestScsiBasic(relbase.eoan, TestBasicScsiAbs): |
25 | __test__ = True |
26 | |
27 | diff --git a/tests/vmtests/test_basic_dasd.py b/tests/vmtests/test_basic_dasd.py |
28 | index 8079edd..391bafc 100644 |
29 | --- a/tests/vmtests/test_basic_dasd.py |
30 | +++ b/tests/vmtests/test_basic_dasd.py |
31 | @@ -52,10 +52,6 @@ class BionicTestBasicDasd(relbase.bionic, TestBasicDasd): |
32 | __test__ = True |
33 | |
34 | |
35 | -class DiscoTestBasicDasd(relbase.disco, TestBasicDasd): |
36 | - __test__ = True |
37 | - |
38 | - |
39 | class EoanTestBasicDasd(relbase.eoan, TestBasicDasd): |
40 | __test__ = True |
41 | |
42 | diff --git a/tests/vmtests/test_bcache_basic.py b/tests/vmtests/test_bcache_basic.py |
43 | index bf77381..54bac81 100644 |
44 | --- a/tests/vmtests/test_bcache_basic.py |
45 | +++ b/tests/vmtests/test_bcache_basic.py |
46 | @@ -64,10 +64,6 @@ class BionicBcacheBasic(relbase.bionic, TestBcacheBasic): |
47 | __test__ = True |
48 | |
49 | |
50 | -class DiscoBcacheBasic(relbase.disco, TestBcacheBasic): |
51 | - __test__ = True |
52 | - |
53 | - |
54 | class EoanBcacheBasic(relbase.eoan, TestBcacheBasic): |
55 | __test__ = True |
56 | |
57 | diff --git a/tests/vmtests/test_bcache_bug1718699.py b/tests/vmtests/test_bcache_bug1718699.py |
58 | index f4937ab..8c29046 100644 |
59 | --- a/tests/vmtests/test_bcache_bug1718699.py |
60 | +++ b/tests/vmtests/test_bcache_bug1718699.py |
61 | @@ -19,10 +19,6 @@ class BionicTestBcacheBug1718699(relbase.bionic, TestBcacheBug1718699): |
62 | __test__ = True |
63 | |
64 | |
65 | -class DiscoTestBcacheBug1718699(relbase.disco, TestBcacheBug1718699): |
66 | - __test__ = True |
67 | - |
68 | - |
69 | class EoanTestBcacheBug1718699(relbase.eoan, TestBcacheBug1718699): |
70 | __test__ = True |
71 | |
72 | diff --git a/tests/vmtests/test_bcache_ceph.py b/tests/vmtests/test_bcache_ceph.py |
73 | index f94a8b0..d24994a 100644 |
74 | --- a/tests/vmtests/test_bcache_ceph.py |
75 | +++ b/tests/vmtests/test_bcache_ceph.py |
76 | @@ -75,10 +75,6 @@ class BionicTestBcacheCeph(relbase.bionic, TestBcacheCeph): |
77 | __test__ = True |
78 | |
79 | |
80 | -class DiscoTestBcacheCeph(relbase.disco, TestBcacheCeph): |
81 | - __test__ = True |
82 | - |
83 | - |
84 | class EoanTestBcacheCeph(relbase.eoan, TestBcacheCeph): |
85 | __test__ = True |
86 | |
87 | diff --git a/tests/vmtests/test_bcache_partitions.py b/tests/vmtests/test_bcache_partitions.py |
88 | index faa23a0..f41e645 100644 |
89 | --- a/tests/vmtests/test_bcache_partitions.py |
90 | +++ b/tests/vmtests/test_bcache_partitions.py |
91 | @@ -25,10 +25,6 @@ class BionicTestBcachePartitions(relbase.bionic, TestBcachePartitions): |
92 | __test__ = True |
93 | |
94 | |
95 | -class DiscoTestBcachePartitions(relbase.disco, TestBcachePartitions): |
96 | - __test__ = True |
97 | - |
98 | - |
99 | class EoanTestBcachePartitions(relbase.eoan, TestBcachePartitions): |
100 | __test__ = True |
101 | |
102 | diff --git a/tests/vmtests/test_fs_battery.py b/tests/vmtests/test_fs_battery.py |
103 | index 58eb441..6c8cfc2 100644 |
104 | --- a/tests/vmtests/test_fs_battery.py |
105 | +++ b/tests/vmtests/test_fs_battery.py |
106 | @@ -231,10 +231,6 @@ class BionicTestFsBattery(relbase.bionic, TestFsBattery): |
107 | __test__ = True |
108 | |
109 | |
110 | -class DiscoTestFsBattery(relbase.disco, TestFsBattery): |
111 | - __test__ = True |
112 | - |
113 | - |
114 | class EoanTestFsBattery(relbase.eoan, TestFsBattery): |
115 | __test__ = True |
116 | |
117 | diff --git a/tests/vmtests/test_iscsi.py b/tests/vmtests/test_iscsi.py |
118 | index 227e96b..c99264c 100644 |
119 | --- a/tests/vmtests/test_iscsi.py |
120 | +++ b/tests/vmtests/test_iscsi.py |
121 | @@ -72,10 +72,6 @@ class BionicTestIscsiBasic(relbase.bionic, TestBasicIscsiAbs): |
122 | __test__ = True |
123 | |
124 | |
125 | -class DiscoTestIscsiBasic(relbase.disco, TestBasicIscsiAbs): |
126 | - __test__ = True |
127 | - |
128 | - |
129 | class EoanTestIscsiBasic(relbase.eoan, TestBasicIscsiAbs): |
130 | __test__ = True |
131 | |
132 | diff --git a/tests/vmtests/test_journald_reporter.py b/tests/vmtests/test_journald_reporter.py |
133 | index de060d5..d29b4d4 100644 |
134 | --- a/tests/vmtests/test_journald_reporter.py |
135 | +++ b/tests/vmtests/test_journald_reporter.py |
136 | @@ -32,10 +32,6 @@ class BionicTestJournaldReporter(relbase.bionic, TestJournaldReporter): |
137 | __test__ = True |
138 | |
139 | |
140 | -class DiscoTestJournaldReporter(relbase.disco, TestJournaldReporter): |
141 | - __test__ = True |
142 | - |
143 | - |
144 | class EoanTestJournaldReporter(relbase.eoan, TestJournaldReporter): |
145 | __test__ = True |
146 | |
147 | diff --git a/tests/vmtests/test_lvm.py b/tests/vmtests/test_lvm.py |
148 | index 429b5c2..a79a705 100644 |
149 | --- a/tests/vmtests/test_lvm.py |
150 | +++ b/tests/vmtests/test_lvm.py |
151 | @@ -77,10 +77,6 @@ class BionicTestLvm(relbase.bionic, TestLvmAbs): |
152 | __test__ = True |
153 | |
154 | |
155 | -class DiscoTestLvm(relbase.disco, TestLvmAbs): |
156 | - __test__ = True |
157 | - |
158 | - |
159 | class EoanTestLvm(relbase.eoan, TestLvmAbs): |
160 | __test__ = True |
161 | |
162 | diff --git a/tests/vmtests/test_lvm_iscsi.py b/tests/vmtests/test_lvm_iscsi.py |
163 | index 5578d22..6211d67 100644 |
164 | --- a/tests/vmtests/test_lvm_iscsi.py |
165 | +++ b/tests/vmtests/test_lvm_iscsi.py |
166 | @@ -85,10 +85,6 @@ class BionicTestIscsiLvm(relbase.bionic, TestLvmIscsiAbs): |
167 | __test__ = True |
168 | |
169 | |
170 | -class DiscoTestIscsiLvm(relbase.disco, TestLvmIscsiAbs): |
171 | - __test__ = True |
172 | - |
173 | - |
174 | class EoanTestIscsiLvm(relbase.eoan, TestLvmIscsiAbs): |
175 | __test__ = True |
176 | |
177 | diff --git a/tests/vmtests/test_lvm_raid.py b/tests/vmtests/test_lvm_raid.py |
178 | index 24c2765..72c6180 100644 |
179 | --- a/tests/vmtests/test_lvm_raid.py |
180 | +++ b/tests/vmtests/test_lvm_raid.py |
181 | @@ -51,10 +51,6 @@ class EoanTestLvmOverRaid(relbase.eoan, TestLvmOverRaidAbs): |
182 | __test__ = True |
183 | |
184 | |
185 | -class DiscoTestLvmOverRaid(relbase.disco, TestLvmOverRaidAbs): |
186 | - __test__ = True |
187 | - |
188 | - |
189 | class BionicTestLvmOverRaid(relbase.bionic, TestLvmOverRaidAbs): |
190 | __test__ = True |
191 | |
192 | diff --git a/tests/vmtests/test_mdadm_bcache.py b/tests/vmtests/test_mdadm_bcache.py |
193 | index 9819ebf..ea26393 100644 |
194 | --- a/tests/vmtests/test_mdadm_bcache.py |
195 | +++ b/tests/vmtests/test_mdadm_bcache.py |
196 | @@ -151,10 +151,6 @@ class BionicTestMdadmBcache(relbase.bionic, TestMdadmBcacheAbs): |
197 | __test__ = True |
198 | |
199 | |
200 | -class DiscoTestMdadmBcache(relbase.disco, TestMdadmBcacheAbs): |
201 | - __test__ = True |
202 | - |
203 | - |
204 | class EoanTestMdadmBcache(relbase.eoan, TestMdadmBcacheAbs): |
205 | __test__ = True |
206 | |
207 | @@ -200,10 +196,6 @@ class BionicTestMirrorboot(relbase.bionic, TestMirrorbootAbs): |
208 | __test__ = True |
209 | |
210 | |
211 | -class DiscoTestMirrorboot(relbase.disco, TestMirrorbootAbs): |
212 | - __test__ = True |
213 | - |
214 | - |
215 | class EoanTestMirrorboot(relbase.eoan, TestMirrorbootAbs): |
216 | __test__ = True |
217 | |
218 | @@ -252,11 +244,6 @@ class BionicTestMirrorbootPartitions(relbase.bionic, |
219 | __test__ = True |
220 | |
221 | |
222 | -class DiscoTestMirrorbootPartitions(relbase.disco, |
223 | - TestMirrorbootPartitionsAbs): |
224 | - __test__ = True |
225 | - |
226 | - |
227 | class EoanTestMirrorbootPartitions(relbase.eoan, |
228 | TestMirrorbootPartitionsAbs): |
229 | __test__ = True |
230 | @@ -315,11 +302,6 @@ class BionicTestMirrorbootPartitionsUEFI(relbase.bionic, |
231 | __test__ = True |
232 | |
233 | |
234 | -class DiscoTestMirrorbootPartitionsUEFI(relbase.disco, |
235 | - TestMirrorbootPartitionsUEFIAbs): |
236 | - __test__ = True |
237 | - |
238 | - |
239 | class EoanTestMirrorbootPartitionsUEFI(relbase.eoan, |
240 | TestMirrorbootPartitionsUEFIAbs): |
241 | __test__ = True |
242 | @@ -367,10 +349,6 @@ class BionicTestRaid5boot(relbase.bionic, TestRaid5bootAbs): |
243 | __test__ = True |
244 | |
245 | |
246 | -class DiscoTestRaid5boot(relbase.disco, TestRaid5bootAbs): |
247 | - __test__ = True |
248 | - |
249 | - |
250 | class EoanTestRaid5boot(relbase.eoan, TestRaid5bootAbs): |
251 | __test__ = True |
252 | |
253 | @@ -432,10 +410,6 @@ class BionicTestRaid6boot(relbase.bionic, TestRaid6bootAbs): |
254 | __test__ = True |
255 | |
256 | |
257 | -class DiscoTestRaid6boot(relbase.disco, TestRaid6bootAbs): |
258 | - __test__ = True |
259 | - |
260 | - |
261 | class EoanTestRaid6boot(relbase.eoan, TestRaid6bootAbs): |
262 | __test__ = True |
263 | |
264 | @@ -483,10 +457,6 @@ class BionicTestRaid10boot(relbase.bionic, TestRaid10bootAbs): |
265 | __test__ = True |
266 | |
267 | |
268 | -class DiscoTestRaid10boot(relbase.disco, TestRaid10bootAbs): |
269 | - __test__ = True |
270 | - |
271 | - |
272 | class EoanTestRaid10boot(relbase.eoan, TestRaid10bootAbs): |
273 | __test__ = True |
274 | |
275 | @@ -591,10 +561,6 @@ class BionicTestAllindata(relbase.bionic, TestAllindataAbs): |
276 | __test__ = True |
277 | |
278 | |
279 | -class DiscoTestAllindata(relbase.disco, TestAllindataAbs): |
280 | - __test__ = True |
281 | - |
282 | - |
283 | class EoanTestAllindata(relbase.eoan, TestAllindataAbs): |
284 | __test__ = True |
285 | |
286 | diff --git a/tests/vmtests/test_mdadm_iscsi.py b/tests/vmtests/test_mdadm_iscsi.py |
287 | index c0e6989..26b1f71 100644 |
288 | --- a/tests/vmtests/test_mdadm_iscsi.py |
289 | +++ b/tests/vmtests/test_mdadm_iscsi.py |
290 | @@ -50,10 +50,6 @@ class BionicTestIscsiMdadm(relbase.bionic, TestMdadmIscsiAbs): |
291 | __test__ = True |
292 | |
293 | |
294 | -class DiscoTestIscsiMdadm(relbase.disco, TestMdadmIscsiAbs): |
295 | - __test__ = True |
296 | - |
297 | - |
298 | class EoanTestIscsiMdadm(relbase.eoan, TestMdadmIscsiAbs): |
299 | __test__ = True |
300 | |
301 | diff --git a/tests/vmtests/test_multipath.py b/tests/vmtests/test_multipath.py |
302 | index c807a9b..b00303e 100644 |
303 | --- a/tests/vmtests/test_multipath.py |
304 | +++ b/tests/vmtests/test_multipath.py |
305 | @@ -81,10 +81,6 @@ class BionicTestMultipathBasic(relbase.bionic, TestMultipathBasicAbs): |
306 | __test__ = True |
307 | |
308 | |
309 | -class DiscoTestMultipathBasic(relbase.disco, TestMultipathBasicAbs): |
310 | - __test__ = True |
311 | - |
312 | - |
313 | class EoanTestMultipathBasic(relbase.eoan, TestMultipathBasicAbs): |
314 | __test__ = True |
315 | |
316 | diff --git a/tests/vmtests/test_network.py b/tests/vmtests/test_network.py |
317 | index f54e40a..601cad4 100644 |
318 | --- a/tests/vmtests/test_network.py |
319 | +++ b/tests/vmtests/test_network.py |
320 | @@ -472,10 +472,6 @@ class BionicTestNetworkBasic(relbase.bionic, TestNetworkBasicAbs): |
321 | __test__ = True |
322 | |
323 | |
324 | -class DiscoTestNetworkBasic(relbase.disco, TestNetworkBasicAbs): |
325 | - __test__ = True |
326 | - |
327 | - |
328 | class EoanTestNetworkBasic(relbase.eoan, TestNetworkBasicAbs): |
329 | __test__ = True |
330 | |
331 | diff --git a/tests/vmtests/test_network_alias.py b/tests/vmtests/test_network_alias.py |
332 | index 13c89ee..68e7de4 100644 |
333 | --- a/tests/vmtests/test_network_alias.py |
334 | +++ b/tests/vmtests/test_network_alias.py |
335 | @@ -52,10 +52,6 @@ class BionicTestNetworkAlias(relbase.bionic, TestNetworkAliasAbs): |
336 | __test__ = True |
337 | |
338 | |
339 | -class DiscoTestNetworkAlias(relbase.disco, TestNetworkAliasAbs): |
340 | - __test__ = True |
341 | - |
342 | - |
343 | class EoanTestNetworkAlias(relbase.eoan, TestNetworkAliasAbs): |
344 | __test__ = True |
345 | |
346 | diff --git a/tests/vmtests/test_network_bonding.py b/tests/vmtests/test_network_bonding.py |
347 | index b808aec..913c7ff 100644 |
348 | --- a/tests/vmtests/test_network_bonding.py |
349 | +++ b/tests/vmtests/test_network_bonding.py |
350 | @@ -57,10 +57,6 @@ class BionicTestBonding(relbase.bionic, TestNetworkBondingAbs): |
351 | __test__ = True |
352 | |
353 | |
354 | -class DiscoTestBonding(relbase.disco, TestNetworkBondingAbs): |
355 | - __test__ = True |
356 | - |
357 | - |
358 | class EoanTestBonding(relbase.eoan, TestNetworkBondingAbs): |
359 | __test__ = True |
360 | |
361 | diff --git a/tests/vmtests/test_network_bridging.py b/tests/vmtests/test_network_bridging.py |
362 | index 3b5b99c..daaade5 100644 |
363 | --- a/tests/vmtests/test_network_bridging.py |
364 | +++ b/tests/vmtests/test_network_bridging.py |
365 | @@ -236,10 +236,6 @@ class BionicTestBridging(relbase.bionic, TestBridgeNetworkAbs): |
366 | __test__ = True |
367 | |
368 | |
369 | -class DiscoTestBridging(relbase.disco, TestBridgeNetworkAbs): |
370 | - __test__ = True |
371 | - |
372 | - |
373 | class EoanTestBridging(relbase.eoan, TestBridgeNetworkAbs): |
374 | __test__ = True |
375 | |
376 | diff --git a/tests/vmtests/test_network_ipv6.py b/tests/vmtests/test_network_ipv6.py |
377 | index e0a39a0..8f0dd54 100644 |
378 | --- a/tests/vmtests/test_network_ipv6.py |
379 | +++ b/tests/vmtests/test_network_ipv6.py |
380 | @@ -53,10 +53,6 @@ class BionicTestNetworkIPV6(relbase.bionic, TestNetworkIPV6Abs): |
381 | __test__ = True |
382 | |
383 | |
384 | -class DiscoTestNetworkIPV6(relbase.disco, TestNetworkIPV6Abs): |
385 | - __test__ = True |
386 | - |
387 | - |
388 | class EoanTestNetworkIPV6(relbase.eoan, TestNetworkIPV6Abs): |
389 | __test__ = True |
390 | |
391 | diff --git a/tests/vmtests/test_network_ipv6_static.py b/tests/vmtests/test_network_ipv6_static.py |
392 | index 278c837..8a1ba2f 100644 |
393 | --- a/tests/vmtests/test_network_ipv6_static.py |
394 | +++ b/tests/vmtests/test_network_ipv6_static.py |
395 | @@ -23,10 +23,6 @@ class BionicTestNetworkIPV6Static(relbase.bionic, TestNetworkIPV6StaticAbs): |
396 | __test__ = True |
397 | |
398 | |
399 | -class DiscoTestNetworkIPV6Static(relbase.disco, TestNetworkIPV6StaticAbs): |
400 | - __test__ = True |
401 | - |
402 | - |
403 | class EoanTestNetworkIPV6Static(relbase.eoan, TestNetworkIPV6StaticAbs): |
404 | __test__ = True |
405 | |
406 | diff --git a/tests/vmtests/test_network_ipv6_vlan.py b/tests/vmtests/test_network_ipv6_vlan.py |
407 | index f0f7389..709886f 100644 |
408 | --- a/tests/vmtests/test_network_ipv6_vlan.py |
409 | +++ b/tests/vmtests/test_network_ipv6_vlan.py |
410 | @@ -22,10 +22,6 @@ class BionicTestNetworkIPV6Vlan(relbase.bionic, TestNetworkIPV6VlanAbs): |
411 | __test__ = True |
412 | |
413 | |
414 | -class DiscoTestNetworkIPV6Vlan(relbase.disco, TestNetworkIPV6VlanAbs): |
415 | - __test__ = True |
416 | - |
417 | - |
418 | class EoanTestNetworkIPV6Vlan(relbase.eoan, TestNetworkIPV6VlanAbs): |
419 | __test__ = True |
420 | |
421 | diff --git a/tests/vmtests/test_network_mtu.py b/tests/vmtests/test_network_mtu.py |
422 | index e1a5565..bf13459 100644 |
423 | --- a/tests/vmtests/test_network_mtu.py |
424 | +++ b/tests/vmtests/test_network_mtu.py |
425 | @@ -189,14 +189,6 @@ class BionicTestNetworkMtu(relbase.bionic, TestNetworkMtuAbs): |
426 | upgrade_packages = "cloud-init,systemd" |
427 | |
428 | |
429 | -class DiscoTestNetworkMtu(relbase.disco, TestNetworkMtuAbs): |
430 | - conf_file = "examples/tests/network_mtu_networkd.yaml" |
431 | - __test__ = True |
432 | - # Until systemd is released with the fix for LP:#1671951 |
433 | - add_repos = "ppa:ddstreet/systemd" |
434 | - upgrade_packages = "cloud-init,systemd" |
435 | - |
436 | - |
437 | class EoanTestNetworkMtu(relbase.eoan, TestNetworkMtuAbs): |
438 | conf_file = "examples/tests/network_mtu_networkd.yaml" |
439 | __test__ = True |
440 | diff --git a/tests/vmtests/test_network_static.py b/tests/vmtests/test_network_static.py |
441 | index b2fac16..80ff2cd 100644 |
442 | --- a/tests/vmtests/test_network_static.py |
443 | +++ b/tests/vmtests/test_network_static.py |
444 | @@ -28,10 +28,6 @@ class BionicTestNetworkStatic(relbase.bionic, TestNetworkStaticAbs): |
445 | __test__ = True |
446 | |
447 | |
448 | -class DiscoTestNetworkStatic(relbase.disco, TestNetworkStaticAbs): |
449 | - __test__ = True |
450 | - |
451 | - |
452 | class EoanTestNetworkStatic(relbase.eoan, TestNetworkStaticAbs): |
453 | __test__ = True |
454 | |
455 | diff --git a/tests/vmtests/test_network_static_routes.py b/tests/vmtests/test_network_static_routes.py |
456 | index 8e63df8..dfcbffe 100644 |
457 | --- a/tests/vmtests/test_network_static_routes.py |
458 | +++ b/tests/vmtests/test_network_static_routes.py |
459 | @@ -28,11 +28,6 @@ class BionicTestNetworkStaticRoutes(relbase.bionic, |
460 | __test__ = True |
461 | |
462 | |
463 | -class DiscoTestNetworkStaticRoutes(relbase.disco, |
464 | - TestNetworkStaticRoutesAbs): |
465 | - __test__ = True |
466 | - |
467 | - |
468 | class EoanTestNetworkStaticRoutes(relbase.eoan, |
469 | TestNetworkStaticRoutesAbs): |
470 | __test__ = True |
471 | diff --git a/tests/vmtests/test_network_vlan.py b/tests/vmtests/test_network_vlan.py |
472 | index 27aaa2b..b7c4e06 100644 |
473 | --- a/tests/vmtests/test_network_vlan.py |
474 | +++ b/tests/vmtests/test_network_vlan.py |
475 | @@ -76,10 +76,6 @@ class BionicTestNetworkVlan(relbase.bionic, TestNetworkVlanAbs): |
476 | __test__ = True |
477 | |
478 | |
479 | -class DiscoTestNetworkVlan(relbase.disco, TestNetworkVlanAbs): |
480 | - __test__ = True |
481 | - |
482 | - |
483 | class EoanTestNetworkVlan(relbase.eoan, TestNetworkVlanAbs): |
484 | __test__ = True |
485 | |
486 | diff --git a/tests/vmtests/test_nvme.py b/tests/vmtests/test_nvme.py |
487 | index 4f0b4d7..7c00829 100644 |
488 | --- a/tests/vmtests/test_nvme.py |
489 | +++ b/tests/vmtests/test_nvme.py |
490 | @@ -73,10 +73,6 @@ class BionicTestNvme(relbase.bionic, TestNvmeAbs): |
491 | __test__ = True |
492 | |
493 | |
494 | -class DiscoTestNvme(relbase.disco, TestNvmeAbs): |
495 | - __test__ = True |
496 | - |
497 | - |
498 | class EoanTestNvme(relbase.eoan, TestNvmeAbs): |
499 | __test__ = True |
500 | |
501 | @@ -143,10 +139,6 @@ class BionicTestNvmeBcache(relbase.bionic, TestNvmeBcacheAbs): |
502 | __test__ = True |
503 | |
504 | |
505 | -class DiscoTestNvmeBcache(relbase.disco, TestNvmeBcacheAbs): |
506 | - __test__ = True |
507 | - |
508 | - |
509 | class EoanTestNvmeBcache(relbase.eoan, TestNvmeBcacheAbs): |
510 | __test__ = True |
511 | |
512 | diff --git a/tests/vmtests/test_pollinate_useragent.py b/tests/vmtests/test_pollinate_useragent.py |
513 | index 046fff5..ff21f20 100644 |
514 | --- a/tests/vmtests/test_pollinate_useragent.py |
515 | +++ b/tests/vmtests/test_pollinate_useragent.py |
516 | @@ -61,10 +61,6 @@ class BionicTestPollinateUserAgent(relbase.bionic, TestPollinateUserAgent): |
517 | __test__ = True |
518 | |
519 | |
520 | -class DiscoTestPollinateUserAgent(relbase.disco, TestPollinateUserAgent): |
521 | - __test__ = True |
522 | - |
523 | - |
524 | class EoanTestPollinateUserAgent(relbase.eoan, TestPollinateUserAgent): |
525 | __test__ = True |
526 | |
527 | diff --git a/tests/vmtests/test_preserve.py b/tests/vmtests/test_preserve.py |
528 | index 6194ab0..f02ba6c 100644 |
529 | --- a/tests/vmtests/test_preserve.py |
530 | +++ b/tests/vmtests/test_preserve.py |
531 | @@ -25,10 +25,6 @@ class BionicTestPreserve(relbase.bionic, TestPreserve): |
532 | __test__ = True |
533 | |
534 | |
535 | -class DiscoTestPreserve(relbase.disco, TestPreserve): |
536 | - __test__ = True |
537 | - |
538 | - |
539 | class EoanTestPreserve(relbase.eoan, TestPreserve): |
540 | __test__ = True |
541 | |
542 | diff --git a/tests/vmtests/test_preserve_raid.py b/tests/vmtests/test_preserve_raid.py |
543 | index 3168f57..cf3a6bb 100644 |
544 | --- a/tests/vmtests/test_preserve_raid.py |
545 | +++ b/tests/vmtests/test_preserve_raid.py |
546 | @@ -25,10 +25,6 @@ class BionicTestPreserveRAID(relbase.bionic, TestPreserveRAID): |
547 | __test__ = True |
548 | |
549 | |
550 | -class DiscoTestPreserveRAID(relbase.disco, TestPreserveRAID): |
551 | - __test__ = True |
552 | - |
553 | - |
554 | class EoanTestPreserveRAID(relbase.eoan, TestPreserveRAID): |
555 | __test__ = True |
556 | |
557 | diff --git a/tests/vmtests/test_raid5_bcache.py b/tests/vmtests/test_raid5_bcache.py |
558 | index a2df218..3d8937e 100644 |
559 | --- a/tests/vmtests/test_raid5_bcache.py |
560 | +++ b/tests/vmtests/test_raid5_bcache.py |
561 | @@ -83,10 +83,6 @@ class BionicTestRaid5Bcache(relbase.bionic, TestMdadmBcacheAbs): |
562 | __test__ = True |
563 | |
564 | |
565 | -class DiscoTestRaid5Bcache(relbase.disco, TestMdadmBcacheAbs): |
566 | - __test__ = True |
567 | - |
568 | - |
569 | class EoanTestRaid5Bcache(relbase.eoan, TestMdadmBcacheAbs): |
570 | __test__ = True |
571 | |
572 | diff --git a/tests/vmtests/test_reuse_raid_member.py b/tests/vmtests/test_reuse_raid_member.py |
573 | index af46a9b..0725966 100644 |
574 | --- a/tests/vmtests/test_reuse_raid_member.py |
575 | +++ b/tests/vmtests/test_reuse_raid_member.py |
576 | @@ -28,10 +28,6 @@ class BionicTestReuseRAIDMember(relbase.bionic, TestReuseRAIDMember): |
577 | __test__ = True |
578 | |
579 | |
580 | -class DiscoTestReuseRAIDMember(relbase.disco, TestReuseRAIDMember): |
581 | - __test__ = True |
582 | - |
583 | - |
584 | class EoanTestReuseRAIDMember(relbase.eoan, TestReuseRAIDMember): |
585 | __test__ = True |
586 | |
587 | @@ -45,11 +41,6 @@ class BionicTestReuseRAIDMemberPartition(relbase.bionic, |
588 | __test__ = True |
589 | |
590 | |
591 | -class DiscoTestReuseRAIDMemberPartition(relbase.disco, |
592 | - TestReuseRAIDMemberPartition): |
593 | - __test__ = True |
594 | - |
595 | - |
596 | class EoanTestReuseRAIDMemberPartition(relbase.eoan, |
597 | TestReuseRAIDMemberPartition): |
598 | __test__ = True |
599 | diff --git a/tests/vmtests/test_simple.py b/tests/vmtests/test_simple.py |
600 | index 9a21879..b34a6fc 100644 |
601 | --- a/tests/vmtests/test_simple.py |
602 | +++ b/tests/vmtests/test_simple.py |
603 | @@ -49,13 +49,6 @@ class BionicTestSimple(relbase.bionic, TestSimple): |
604 | self.output_files_exist(["netplan.yaml"]) |
605 | |
606 | |
607 | -class DiscoTestSimple(relbase.disco, TestSimple): |
608 | - __test__ = True |
609 | - |
610 | - def test_output_files_exist(self): |
611 | - self.output_files_exist(["netplan.yaml"]) |
612 | - |
613 | - |
614 | class EoanTestSimple(relbase.eoan, TestSimple): |
615 | __test__ = True |
616 | |
617 | @@ -112,13 +105,6 @@ class BionicTestSimpleStorage(relbase.bionic, TestSimpleStorage): |
618 | self.output_files_exist(["netplan.yaml"]) |
619 | |
620 | |
621 | -class DiscoTestSimpleStorage(relbase.disco, TestSimpleStorage): |
622 | - __test__ = True |
623 | - |
624 | - def test_output_files_exist(self): |
625 | - self.output_files_exist(["netplan.yaml"]) |
626 | - |
627 | - |
628 | class EoanTestSimpleStorage(relbase.eoan, TestSimpleStorage): |
629 | __test__ = True |
630 | |
631 | diff --git a/tests/vmtests/test_uefi_basic.py b/tests/vmtests/test_uefi_basic.py |
632 | index a20506d..90940dd 100644 |
633 | --- a/tests/vmtests/test_uefi_basic.py |
634 | +++ b/tests/vmtests/test_uefi_basic.py |
635 | @@ -105,10 +105,6 @@ class BionicUefiTestBasic(relbase.bionic, TestBasicAbs): |
636 | __test__ = True |
637 | |
638 | |
639 | -class DiscoUefiTestBasic(relbase.disco, TestBasicAbs): |
640 | - __test__ = True |
641 | - |
642 | - |
643 | class EoanUefiTestBasic(relbase.eoan, TestBasicAbs): |
644 | __test__ = True |
645 | |
646 | @@ -132,11 +128,6 @@ class BionicUefiTestBasic4k(relbase.bionic, TestBasicAbs): |
647 | disk_block_size = 4096 |
648 | |
649 | |
650 | -class DiscoUefiTestBasic4k(relbase.disco, TestBasicAbs): |
651 | - __test__ = True |
652 | - disk_block_size = 4096 |
653 | - |
654 | - |
655 | class EoanUefiTestBasic4k(relbase.eoan, TestBasicAbs): |
656 | __test__ = True |
657 | disk_block_size = 4096 |
658 | diff --git a/tests/vmtests/test_zfsroot.py b/tests/vmtests/test_zfsroot.py |
659 | index 86992c3..c9c73a3 100644 |
660 | --- a/tests/vmtests/test_zfsroot.py |
661 | +++ b/tests/vmtests/test_zfsroot.py |
662 | @@ -96,11 +96,6 @@ class BionicTestZfsRoot(relbase.bionic, TestZfsRootAbs): |
663 | __test__ = True |
664 | |
665 | |
666 | -class DiscoTestZfsRoot(relbase.disco, TestZfsRootAbs): |
667 | - __test__ = True |
668 | - mem = 4096 |
669 | - |
670 | - |
671 | class EoanTestZfsRoot(relbase.eoan, TestZfsRootAbs): |
672 | __test__ = True |
673 | mem = 4096 |
674 | @@ -130,11 +125,6 @@ class BionicTestZfsRootFsType(relbase.bionic, TestZfsRootFsTypeAbs): |
675 | __test__ = True |
676 | |
677 | |
678 | -class DiscoTestZfsRootFsType(relbase.disco, TestZfsRootFsTypeAbs): |
679 | - __test__ = True |
680 | - mem = 4096 |
681 | - |
682 | - |
683 | class EoanTestZfsRootFsType(relbase.eoan, TestZfsRootFsTypeAbs): |
684 | __test__ = True |
685 | mem = 4096 |
686 | diff --git a/tools/remove-vmtest-release b/tools/remove-vmtest-release |
687 | new file mode 100644 |
688 | index 0000000..8ab9b2e |
689 | --- /dev/null |
690 | +++ b/tools/remove-vmtest-release |
691 | @@ -0,0 +1,54 @@ |
692 | +#!/usr/bin/python3 |
693 | + |
694 | +import argparse |
695 | +import glob |
696 | +import os |
697 | + |
698 | + |
699 | +def clean_file(fname, distro): |
700 | + new_content = [] |
701 | + modified = False |
702 | + with open(fname, 'r') as fh: |
703 | + delete = False |
704 | + # using read().splitlines() to strip the newline char |
705 | + for line in fh.read().splitlines(): |
706 | + if line.startswith('class %s' % distro): |
707 | + delete = True |
708 | + # ensure we don't remove final block of text outside |
709 | + # of the distro test class definition scope. |
710 | + # N.B: we match the empty line right before the next class scope |
711 | + elif delete and line and not line[0].isspace(): |
712 | + delete = False |
713 | + |
714 | + if delete: |
715 | + modified = True |
716 | + continue |
717 | + else: |
718 | + new_content.append(line) |
719 | + |
720 | + # skip a re-write of content if no modifications |
721 | + if modified: |
722 | + cleaned_fn = fname |
723 | + with open(cleaned_fn, 'w') as wfh: |
724 | + wfh.write("\n".join(new_content) + '\n') |
725 | + print("Wrote cleaned file: %s" % cleaned_fn) |
726 | + |
727 | + |
728 | +if __name__ == "__main__": |
729 | + parser = argparse.ArgumentParser( |
730 | + prog="remove-vmtest-release", |
731 | + description="Tool to remove vmtest classes by distro release") |
732 | + parser.add_argument('--distro-release', '-d', |
733 | + action='store', required=True) |
734 | + parser.add_argument('--path', '-p', action='store', required=True) |
735 | + |
736 | + args = parser.parse_args() |
737 | + distro = args.distro_release.title() |
738 | + target = args.path |
739 | + if os.path.isdir(target): |
740 | + files = glob.glob(os.path.normpath(target) + '/' + 'test_*.py') |
741 | + else: |
742 | + files = [target] |
743 | + |
744 | + for fname in files: |
745 | + clean_file(fname, distro) |
746 | diff --git a/tools/run-pep8 b/tools/run-pep8 |
747 | index b1dd7c0..c27a96c 100755 |
748 | --- a/tools/run-pep8 |
749 | +++ b/tools/run-pep8 |
750 | @@ -9,6 +9,7 @@ pycheck_dirs=( |
751 | "tools/block-discover-to-config" |
752 | "tools/curtin-log-print" |
753 | "tools/noproxy" |
754 | + "tools/remove-vmtest-release" |
755 | "tools/schema-validate-storage" |
756 | "tools/ssh-keys-list" |
757 | "tools/vmtest-filter" |
758 | diff --git a/tools/run-pyflakes b/tools/run-pyflakes |
759 | index f9c2185..86eb3cc 100755 |
760 | --- a/tools/run-pyflakes |
761 | +++ b/tools/run-pyflakes |
762 | @@ -17,6 +17,7 @@ pycheck_dirs=( |
763 | "tools/block-discover-to-config" |
764 | "tools/curtin-log-print" |
765 | "tools/noproxy" |
766 | + "tools/remove-vmtest-release" |
767 | "tools/schema-validate-storage" |
768 | "tools/ssh-keys-list" |
769 | "tools/vmtest-filter" |
PASSED: Continuous integration, rev:43d6d28cba9 4df66c63a3f265f 799af716cfcc7c /jenkins. ubuntu. com/server/ job/curtin- ci/3827/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 3827/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 3827/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 3827/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= torkoal/ 3827/
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/3827/ /rebuild
https:/