提交 63a24c5e 编写于 作者: P Philippe Mathieu-Daudé 提交者: Fam Zheng

tests/vm: Do not abuse parallelism when HOST != TARGET architecture

Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20181013004034.6968-9-f4bug@amsat.org>
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
Signed-off-by: NFam Zheng <famz@redhat.com>
上级 71531bb5
......@@ -200,10 +200,10 @@ class BaseVM(object):
def qmp(self, *args, **kwargs):
return self._guest.qmp(*args, **kwargs)
def parse_args(vm_name):
def parse_args(vmcls):
def get_default_jobs():
if kvm_available():
if kvm_available(vmcls.arch):
return multiprocessing.cpu_count() / 2
else:
return 1
......@@ -216,7 +216,7 @@ def parse_args(vm_name):
"3 = test command failed")
parser.add_option("--debug", "-D", action="store_true",
help="enable debug output")
parser.add_option("--image", "-i", default="%s.img" % vm_name,
parser.add_option("--image", "-i", default="%s.img" % vmcls.name,
help="image file name")
parser.add_option("--force", "-f", action="store_true",
help="force build image even if image exists")
......@@ -237,7 +237,7 @@ def parse_args(vm_name):
def main(vmcls):
try:
args, argv = parse_args(vmcls.name)
args, argv = parse_args(vmcls)
if not argv and not args.build_qemu and not args.build_image:
print("Nothing to do?")
return 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册