[libvirt PATCH v3 08/10] ci: Implement 'test' helper action

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This simply calls the underlying Makefile target, but allows
additional arguments to be specified in a more convenient and
discoverable way.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 ci/helper | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/ci/helper b/ci/helper
index 4a552595df..4d6dfab19b 100755
--- a/ci/helper
+++ b/ci/helper
@@ -94,6 +94,14 @@ class Parser:
         )
         buildparser.set_defaults(func=Application.action_build)
 
+        # test action
+        testparser = subparsers.add_parser(
+            "test",
+            help="run a build in a container (including tests)",
+            parents=[containerparser, mesonparser],
+        )
+        testparser.set_defaults(func=Application.action_test)
+
         # shell action
         shellparser = subparsers.add_parser(
             "shell",
@@ -137,7 +145,7 @@ class Application:
             target,
         ]
 
-        if self.args.action in ["build", "shell"]:
+        if self.args.action in ["build", "test", "shell"]:
             args.extend([
                 f"CI_ENGINE={self.args.engine}",
                 f"CI_USER_LOGIN={self.args.login}",
@@ -145,7 +153,7 @@ class Application:
                 f"CI_IMAGE_TAG={self.args.image_tag}",
             ])
 
-        if self.args.action == "build":
+        if self.args.action in ["build", "test"]:
             args.extend([
                 f"CI_MESON_ARGS={self.args.meson_args}",
                 f"CI_NINJA_ARGS={self.args.ninja_args}",
@@ -231,6 +239,9 @@ class Application:
     def action_build(self):
         self.make_run(f"ci-build@{self.args.target}")
 
+    def action_test(self):
+        self.make_run(f"ci-test@{self.args.target}")
+
     def action_shell(self):
         self.make_run(f"ci-shell@{self.args.target}")
 
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux