canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #05560
[Merge] ~uralt/autopkgtest-cloud:run-autopkgtest-requester into autopkgtest-cloud:master
Ural Tunaboyu has proposed merging ~uralt/autopkgtest-cloud:run-autopkgtest-requester into autopkgtest-cloud:master.
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~uralt/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/474780
Added an argument to run-autopkgtest to specify the requester of the test for record-keeping purposes.
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~uralt/autopkgtest-cloud:run-autopkgtest-requester into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/run-autopkgtest b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/run-autopkgtest
index 9383aa2..3dc8326 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/run-autopkgtest
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/run-autopkgtest
@@ -110,6 +110,9 @@ def parse_args():
help="Mark this as a bulk (low priority) test where possible",
)
parser.add_argument(
+ "--requester", help="Test requester name to record for posterity."
+ )
+ parser.add_argument(
"package", nargs="+", help="Source package name(s) whose tests to run."
)
args = parser.parse_args()
@@ -170,10 +173,13 @@ if __name__ == "__main__":
params["readable-by"] = args.readable_by
if args.all_proposed:
params["all-proposed"] = True
- try:
- params["requester"] = os.environ["SUDO_USER"]
- except KeyError:
- pass
+ if args.requester:
+ params["requester"] = args.requester
+ else:
+ try:
+ params["requester"] = os.environ["SUDO_USER"]
+ except KeyError:
+ pass
params["submit-time"] = datetime.strftime(
datetime.utcnow(), "%Y-%m-%d %H:%M:%S%z"
)