mirror of https://github.com/xemu-project/xemu.git
tests/vm: Do not abuse parallelism when HOST != TARGET architecture
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-9-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
parent
71531bb591
commit
63a24c5e23
|
@ -200,10 +200,10 @@ class BaseVM(object):
|
||||||
def qmp(self, *args, **kwargs):
|
def qmp(self, *args, **kwargs):
|
||||||
return self._guest.qmp(*args, **kwargs)
|
return self._guest.qmp(*args, **kwargs)
|
||||||
|
|
||||||
def parse_args(vm_name):
|
def parse_args(vmcls):
|
||||||
|
|
||||||
def get_default_jobs():
|
def get_default_jobs():
|
||||||
if kvm_available():
|
if kvm_available(vmcls.arch):
|
||||||
return multiprocessing.cpu_count() / 2
|
return multiprocessing.cpu_count() / 2
|
||||||
else:
|
else:
|
||||||
return 1
|
return 1
|
||||||
|
@ -216,7 +216,7 @@ def parse_args(vm_name):
|
||||||
"3 = test command failed")
|
"3 = test command failed")
|
||||||
parser.add_option("--debug", "-D", action="store_true",
|
parser.add_option("--debug", "-D", action="store_true",
|
||||||
help="enable debug output")
|
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")
|
help="image file name")
|
||||||
parser.add_option("--force", "-f", action="store_true",
|
parser.add_option("--force", "-f", action="store_true",
|
||||||
help="force build image even if image exists")
|
help="force build image even if image exists")
|
||||||
|
@ -237,7 +237,7 @@ def parse_args(vm_name):
|
||||||
|
|
||||||
def main(vmcls):
|
def main(vmcls):
|
||||||
try:
|
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:
|
if not argv and not args.build_qemu and not args.build_image:
|
||||||
print("Nothing to do?")
|
print("Nothing to do?")
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue