aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-10-13 02:40:33 +0200
committerFam Zheng <famz@redhat.com>2018-10-26 22:03:21 +0800
commit63a24c5e2354833a84f18bdf0e857fad8812f65b (patch)
tree509c655eebb14ca477038c7a3c5781826ad3f553 /tests
parent71531bb5915cc6e69689d785ca1ba6a261bd26cf (diff)
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>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/vm/basevm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 9f4794898a..5caf77d6b8 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -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