Tim Andersson has proposed merging
~andersson123/autopkgtest-cloud:seed_new_release_add_dry_run into
autopkgtest-cloud:master.
Commit message:
Add dry run option to seed new release script
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/444096
Add dry run option to seed new release script
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of
~andersson123/autopkgtest-cloud:seed_new_release_add_dry_run into
autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/create-test-instances b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/create-test-instances
old mode 100755
new mode 100644
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release
index 8fdd1a3..c993fec 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/seed-new-release
@@ -70,6 +70,7 @@ def copy_result(rel_path, old_release, new_release):
ap = argparse.ArgumentParser()
ap.add_argument('old_release')
ap.add_argument('new_release')
+ap.add_argument('-d', '--dry-run', action='store_true')
ap.add_argument('results_db', help='path to autopkgtest.db')
args = ap.parse_args()
@@ -91,6 +92,11 @@ while True:
last = batch[-1]
existing.update(batch)
+if args.dry_run:
+ print('--dry-run option chosen, not copying results ' + \
+ 'to new container. Exiting...')
+ sys.exit(0)
+
# get passing result per package/arch from database
db_con = sqlite3.connect(args.results_db)
for (package, arch, run_id) in db_con.execute(
--
Mailing list: https://launchpad.net/~canonical-ubuntu-qa
Post to : [email protected]
Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa
More help : https://help.launchpad.net/ListHelp