Commit 5c2ec9b6 authored by Alex Bennée's avatar Alex Bennée
Browse files

tests/vm: add --build-target option



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: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
parent a4cefbcd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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):
+1 −1
Original line number Diff line number Diff line
@@ -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):
+1 −1
Original line number Diff line number Diff line
@@ -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):