Merge ~iconstantin/ubuntu-security-tools:master into ubuntu-security-tools:master

Proposed by Ian Constantin
Status: Merged
Merged at revision: c4cba33d4e5a1520a69a40f5908a9a90fe0b44dc
Proposed branch: ~iconstantin/ubuntu-security-tools:master
Merge into: ubuntu-security-tools:master
Diff against target: 33 lines (+8/-0)
1 file modified
build-tools/umt (+8/-0)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+446101@code.launchpad.net

Commit message

Adding timeout factor option to cmd_autopkgtest

Description of the change

Adding this option to allow for increased timeout durations when running autopkgtests locally.

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

LGTM - thanks!

review: Approve
Revision history for this message
Ian Constantin (iconstantin) wrote :

Thank you Alex!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/build-tools/umt b/build-tools/umt
2index ae4140e..bc41787 100755
3--- a/build-tools/umt
4+++ b/build-tools/umt
5@@ -2922,6 +2922,8 @@ def cmd_autopkgtest():
6 help="force deletion of ../autopkgtest before running")
7 parser.add_argument("-F", "--ignore-failures", dest="ignore_failures", default=False, action='store_true',
8 help="continue even if test failures encountered when running autopkgtests")
9+ parser.add_argument("-T", "--timeout-factor", dest="timeout_factor", action='store',
10+ help="Multiplies default timeouts by the provided timeout factor (e.g. --timeout-factor 2 will double all timeout durations)")
11 parser.add_argument("-A", "--autopkgtest-config", dest="autopkgtest_config", default=None,
12 help="A configuration file to use to pass extra arguments to autopkgtest (ie gets expanded to @AUTOPKGTEST_CONFIG when passed to autopkgtest)")
13 parser.add_argument("--previous-version", dest="previous_version",
14@@ -2991,6 +2993,9 @@ def run_autopkgtest_tests(opt, args, details):
15 if opt.test_name is not None:
16 cmd.append("--test-name")
17 cmd.append(opt.test_name)
18+ if opt.timeout_factor is not None:
19+ cmd.append("--timeout-factor")
20+ cmd.append(opt.timeout_factor)
21 (rc, report) = runcmd(cmd + ["--", "qemu", image] + args,
22 debug=opt.debug, dry_run=opt.dry_run,
23 # manually check for error so we can continue
24@@ -3027,6 +3032,9 @@ def run_autopkgtest_tests(opt, args, details):
25 if opt.test_name is not None:
26 cmd.append("--test-name")
27 cmd.append(opt.test_name)
28+ if opt.timeout_factor is not None:
29+ cmd.append("--timeout-factor")
30+ cmd.append(opt.timeout_factor)
31 if opt.ppa is not None:
32 # use add-apt-repository to add the PPA inside the testbed VM -
33 # https://github.com/canonical/ubuntu-maintainers-handbook/blob/main/PackageTests.md#in-a-vm-using-the-ppa

Subscribers

People subscribed via source and target branches