Merge ~smoser/curtin:fix/skip-by-date-should-skip-on-skip into curtin:master

Proposed by Scott Moser
Status: Merged
Approved by: Ryan Harper
Approved revision: b36e046d37123b9cb974eab0a416e0bc667ebcb7
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~smoser/curtin:fix/skip-by-date-should-skip-on-skip
Merge into: curtin:master
Diff against target: 24 lines (+3/-3)
1 file modified
tests/vmtests/__init__.py (+3/-3)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Ryan Harper (community) Approve
Review via email: mp+350365@code.launchpad.net

Commit message

vmtests: Let a raised SkipTest go through skip_by_date.

There was a general logic error in skip_by_date. If a setUpClass
raised a SkipTest and the fix-by date had not been raised then
we would swallow that SkipTest. Th result was that the test methods
would fail as the install had not been done.

We saw this specifically at the end of Artful's support. The
artful setUpClass would then raise SkipTest due to
'is_unsupported_ubuntu'. skip_by_date was swallowing that.

The change here is to just let a SkipTest bubble through the
skip_by_date wrapper.

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

Yes, that looks right.

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
b36e046... by Scott Moser

typo locally

Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py
2index 1c62723..442bd8b 100644
3--- a/tests/vmtests/__init__.py
4+++ b/tests/vmtests/__init__.py
5@@ -441,6 +441,8 @@ def skip_by_date(bugnum, fixby, removeby=None, skips=None, install=True):
6 exc = None
7 try:
8 mycallable(*args, **kwargs)
9+ except SkipTest:
10+ raise
11 except Exception as e:
12 exc = e
13
14@@ -459,9 +461,7 @@ def skip_by_date(bugnum, fixby, removeby=None, skips=None, install=True):
15 raise SkipTest(msg)
16 else:
17 # Expected fixed.
18- if isinstance(exc, SkipTest):
19- raise SkipTest(msg)
20- elif d_today > d_removeby:
21+ if d_today > d_removeby:
22 raise RuntimeError(msg)
23 elif exc:
24 raise RuntimeError(msg)

Subscribers

People subscribed via source and target branches