]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/vm: add --build-target option
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 21 Jan 2019 16:48:15 +0000 (16:48 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 8 Feb 2019 17:32:35 +0000 (17:32 +0000)
This allows us to invoke the build with a custom target (for the VMs
that use the {target} format string specifier). Currently OpenBSD is
still hardwired due to problems running check.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
tests/vm/basevm.py
tests/vm/freebsd
tests/vm/netbsd
tests/vm/ubuntu.i386

index 5caf77d6b8af4d1ac6a8f498503a9ac5f6510f31..bdca6cb2fc5677cea3c37cd9f2ec30a07f17d178 100755 (executable)
@@ -228,6 +228,8 @@ def parse_args(vmcls):
                       help="build image")
     parser.add_option("--build-qemu",
                       help="build QEMU from source in guest")
+    parser.add_option("--build-target",
+                      help="QEMU build target", default="check")
     parser.add_option("--interactive", "-I", action="store_true",
                       help="Interactively run command")
     parser.add_option("--snapshot", "-s", action="store_true",
@@ -255,6 +257,7 @@ def main(vmcls):
             cmd = [vm.BUILD_SCRIPT.format(
                    configure_opts = " ".join(argv),
                    jobs=args.jobs,
+                   target=args.build_target,
                    verbose = "V=1" if args.verbose else "")]
         else:
             cmd = argv
index a85c866c3043cf18bf1170bc2adcdc0e4f9a5737..1d64c31b7c018338f893e4942028f867cd220ef7 100755 (executable)
@@ -25,7 +25,7 @@ class FreeBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/vtbd1;
         ./configure {configure_opts};
-        gmake --output-sync -j{jobs} check {verbose};
+        gmake --output-sync -j{jobs} {target} {verbose};
     """
 
     def build_image(self, img):
index edea113bb5543ccea69e22c27877e16930cfe247..a2c3d13af42353c5244e44aa6fedd7cc6470a270 100755 (executable)
@@ -25,7 +25,7 @@ class NetBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/rld1a;
         ./configure --python=python2.7 {configure_opts};
-        gmake --output-sync -j{jobs} check {verbose};
+        gmake --output-sync -j{jobs} {target} {verbose};
     """
 
     def build_image(self, img):
index 252e5148591b319491009fed69f9d292a1c0d2f2..a22d137e76df8b768568de59542c56e917070c4b 100755 (executable)
@@ -26,7 +26,7 @@ class UbuntuX86VM(basevm.BaseVM):
         sudo chmod a+r /dev/vdb;
         tar -xf /dev/vdb;
         ./configure {configure_opts};
-        make --output-sync check -j{jobs} {verbose};
+        make --output-sync {target} -j{jobs} {verbose};
     """
 
     def _gen_cloud_init_iso(self):