← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:trusty_xenial_amd_64 into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:trusty_xenial_amd_64 into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/446766
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:trusty_xenial_amd_64 into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
index 2af9dc1..f927bc8 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
@@ -601,6 +601,24 @@ def request(msg):
     systemd_logging_handler._extra["ADT_RELEASE"] = release
     systemd_logging_handler._extra["ADT_ARCH"] = architecture
 
+    if (release.lower() == "xenial" or release.lower() == "trusty") \
+        and architecture.lower() != "amd64":
+        # these will be written later on
+        code = 99
+        duration = 0
+        os.makedirs(out_dir)
+        # fake a log file
+        with open(os.path.join(out_dir, "log"), "w") as log:
+            log.write("Only running amd64 tests for %s, not running this test.", release)
+        # and the testpackage version (invalid trigger with a reason)
+        with open(
+            os.path.join(out_dir, "testpkg-version"), "w"
+        ) as testpkg_version:
+            testpkg_version.write(
+                "invalid trigger: we only run amd64 tests for trusty and xenial."
+            )
+        dont_run = True
+
     body = msg.body
     if isinstance(body, bytes):
         try:

Follow ups