Merge lp:~raharper/curtin/trunk.skiptest-zesty-bcache into lp:~curtin-dev/curtin/trunk

Proposed by Ryan Harper
Status: Merged
Merged at revision: 470
Proposed branch: lp:~raharper/curtin/trunk.skiptest-zesty-bcache
Merge into: lp:~curtin-dev/curtin/trunk
Diff against target: 38 lines (+17/-0)
2 files modified
tests/vmtests/__init__.py (+11/-0)
tests/vmtests/test_mdadm_bcache.py (+6/-0)
To merge this branch: bzr merge lp:~raharper/curtin/trunk.skiptest-zesty-bcache
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+318032@code.launchpad.net

Description of the change

vmtest: allow time-based skipping of tests, apply to ZestyMdadmBcache

Zesty kernel has broken bcache device names, tracked in LP: #1667078.
Allow vmtest to skip known broken tests for a period of time, raising
SkipTest from now() till some future date. Also, raise an exception if
we're skipping the test past a second date.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

some questions, i approve if you want to pull it as it is.

Revision history for this message
Scott Moser (smoser) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/vmtests/__init__.py'
2--- tests/vmtests/__init__.py 2017-02-21 20:25:21 +0000
3+++ tests/vmtests/__init__.py 2017-02-22 21:32:37 +0000
4@@ -480,6 +480,17 @@
5 return disks
6
7 @classmethod
8+ def skip_by_date(cls, clsname, release, bugnum, fixby, removeby):
9+ if datetime.date.today() < datetime.date(*fixby):
10+ raise SkipTest(
11+ "LP: #%s not expected to be fixed in %s yet" % (bugnum,
12+ release))
13+ if datetime.date.today() > datetime.date(*removeby):
14+ raise RuntimeError(
15+ "Please remove the LP: #%s workaround in %s",
16+ bugnum, clsname)
17+
18+ @classmethod
19 def setUpClass(cls):
20 # check if we should skip due to host arch
21 if cls.arch in cls.arch_skip:
22
23=== modified file 'tests/vmtests/test_mdadm_bcache.py'
24--- tests/vmtests/test_mdadm_bcache.py 2017-02-07 16:52:56 +0000
25+++ tests/vmtests/test_mdadm_bcache.py 2017-02-22 21:32:37 +0000
26@@ -144,6 +144,12 @@
27 class ZestyTestMdadmBcache(relbase.zesty, TestMdadmBcacheAbs):
28 __test__ = True
29
30+ @classmethod
31+ def setUpClass(cls):
32+ cls.skip_by_date(cls.__name__, cls.release, "1667078",
33+ (2017, 3, 22), (2017, 3, 31))
34+ super().setUpClass()
35+
36
37 class TestMirrorbootAbs(TestMdadmAbs):
38 # alternative config for more complex setup

Subscribers

People subscribed via source and target branches