Merge lp:~powersj/curtin/fix-vmtest-log-exception into lp:~curtin-dev/curtin/trunk

Proposed by Joshua Powers
Status: Merged
Merged at revision: 524
Proposed branch: lp:~powersj/curtin/fix-vmtest-log-exception
Merge into: lp:~curtin-dev/curtin/trunk
Diff against target: 17 lines (+5/-2)
1 file modified
tests/vmtests/__init__.py (+5/-2)
To merge this branch: bzr merge lp:~powersj/curtin/fix-vmtest-log-exception
Reviewer Review Type Date Requested Status
Ryan Harper (community) Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+330108@code.launchpad.net

Commit message

vmtest: catch exceptions in curtin-log-print

Wraps the calling of curtin-log-print to catch any exceptions
that result. Was causing large image files to be left behind as
an exception generated by the curtin-log-print prevented proper
cleanup.

LP: #1714592

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
Ryan Harper (raharper) wrote :

Looks good! Thanks

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-08-15 14:59:11 +0000
3+++ tests/vmtests/__init__.py 2017-09-01 21:23:08 +0000
4@@ -877,8 +877,11 @@
5 raise
6
7 # capture curtin install log and webhook timings
8- util.subp(["tools/curtin-log-print", "--dumpfiles", cls.td.logs,
9- cls.reporting_log], capture=True)
10+ try:
11+ util.subp(["tools/curtin-log-print", "--dumpfiles", cls.td.logs,
12+ cls.reporting_log], capture=True)
13+ except util.ProcessExecutionError as error:
14+ logger.debug('tools/curtin-log-print failed: %s', error)
15
16 logger.info(
17 "%s: setUpClass finished. took %.02f seconds. Running testcases.",

Subscribers

People subscribed via source and target branches