提交 5c2ec9b6 编写于 作者: A Alex Bennée

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: NAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
上级 a4cefbcd
......@@ -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
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册