aboutsummaryrefslogtreecommitdiff
path: root/tests/vm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/basevm.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index cc0809b6c7..7acb48b876 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -551,8 +551,15 @@ def parse_config(config, args):
def parse_args(vmcls):
def get_default_jobs():
- if kvm_available(vmcls.arch):
- return multiprocessing.cpu_count() // 2
+ if multiprocessing.cpu_count() > 1:
+ if kvm_available(vmcls.arch):
+ return multiprocessing.cpu_count() // 2
+ elif os.uname().machine == "x86_64" and \
+ vmcls.arch in ["aarch64", "x86_64", "i386"]:
+ # MTTCG is available on these arches and we can allow
+ # more cores. but only up to a reasonable limit. User
+ # can always override these limits with --jobs.
+ return min(multiprocessing.cpu_count() // 2, 8)
else:
return 1