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
diff --git a/build-tools/umt b/build-tools/umt
index ae4140e..bc41787 100755
--- a/build-tools/umt
+++ b/build-tools/umt
@@ -2922,6 +2922,8 @@ def cmd_autopkgtest():
2922 help="force deletion of ../autopkgtest before running")2922 help="force deletion of ../autopkgtest before running")
2923 parser.add_argument("-F", "--ignore-failures", dest="ignore_failures", default=False, action='store_true',2923 parser.add_argument("-F", "--ignore-failures", dest="ignore_failures", default=False, action='store_true',
2924 help="continue even if test failures encountered when running autopkgtests")2924 help="continue even if test failures encountered when running autopkgtests")
2925 parser.add_argument("-T", "--timeout-factor", dest="timeout_factor", action='store',
2926 help="Multiplies default timeouts by the provided timeout factor (e.g. --timeout-factor 2 will double all timeout durations)")
2925 parser.add_argument("-A", "--autopkgtest-config", dest="autopkgtest_config", default=None,2927 parser.add_argument("-A", "--autopkgtest-config", dest="autopkgtest_config", default=None,
2926 help="A configuration file to use to pass extra arguments to autopkgtest (ie gets expanded to @AUTOPKGTEST_CONFIG when passed to autopkgtest)")2928 help="A configuration file to use to pass extra arguments to autopkgtest (ie gets expanded to @AUTOPKGTEST_CONFIG when passed to autopkgtest)")
2927 parser.add_argument("--previous-version", dest="previous_version",2929 parser.add_argument("--previous-version", dest="previous_version",
@@ -2991,6 +2993,9 @@ def run_autopkgtest_tests(opt, args, details):
2991 if opt.test_name is not None:2993 if opt.test_name is not None:
2992 cmd.append("--test-name")2994 cmd.append("--test-name")
2993 cmd.append(opt.test_name)2995 cmd.append(opt.test_name)
2996 if opt.timeout_factor is not None:
2997 cmd.append("--timeout-factor")
2998 cmd.append(opt.timeout_factor)
2994 (rc, report) = runcmd(cmd + ["--", "qemu", image] + args,2999 (rc, report) = runcmd(cmd + ["--", "qemu", image] + args,
2995 debug=opt.debug, dry_run=opt.dry_run,3000 debug=opt.debug, dry_run=opt.dry_run,
2996 # manually check for error so we can continue3001 # manually check for error so we can continue
@@ -3027,6 +3032,9 @@ def run_autopkgtest_tests(opt, args, details):
3027 if opt.test_name is not None:3032 if opt.test_name is not None:
3028 cmd.append("--test-name")3033 cmd.append("--test-name")
3029 cmd.append(opt.test_name)3034 cmd.append(opt.test_name)
3035 if opt.timeout_factor is not None:
3036 cmd.append("--timeout-factor")
3037 cmd.append(opt.timeout_factor)
3030 if opt.ppa is not None:3038 if opt.ppa is not None:
3031 # use add-apt-repository to add the PPA inside the testbed VM -3039 # use add-apt-repository to add the PPA inside the testbed VM -
3032 # https://github.com/canonical/ubuntu-maintainers-handbook/blob/main/PackageTests.md#in-a-vm-using-the-ppa3040 # 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