[libvirt PATCH 09/11] ci: helper: Accept --cross-arch argument

Andrea Bolognani abologna at redhat.com
Fri Apr 23 15:03:06 UTC 2021


This argument is accepted by all actions that use containers.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 ci/helper | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/ci/helper b/ci/helper
index 31e05c0e38..e39934d357 100755
--- a/ci/helper
+++ b/ci/helper
@@ -23,6 +23,10 @@ class Parser:
             "target",
             help="perform action on target OS",
         )
+        containerparser.add_argument(
+            "-x", "--cross-arch",
+            help="target architecture for cross-compiler",
+        )
         containerparser.add_argument(
             "--engine",
             choices=["auto", "podman", "docker"],
@@ -188,7 +192,13 @@ class Application:
 
     def _make_run_action(self, action):
         target = self._args.target
-        make_target = f"{action}@{target}"
+        cross = self._args.cross_arch
+
+        if cross:
+            make_target = f"{action}@{target}-cross-{cross}"
+        else:
+            make_target = f"{action}@{target}"
+
         self._make_run(make_target)
 
     def _lcitool_run(self, args):
-- 
2.26.3




More information about the libvir-list mailing list