diff tests/run-tests.py @ 40245:e7e70c033783

run-tests: run tests with as many processes as cores by default This seems like a useful default behavior so tests run faster by default* * Except in special circumstances where the OS/filesystem doesn't scale well to many CPU cores (like APFS *cough* *cough*). Differential Revision: https://phab.mercurial-scm.org/D5071
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 13 Oct 2018 12:20:24 +0200
parents 1039404c5e1d
children 8cf459d8b111
line wrap: on
line diff
--- a/tests/run-tests.py	Sat Oct 13 12:11:45 2018 +0200
+++ b/tests/run-tests.py	Sat Oct 13 12:20:24 2018 +0200
@@ -51,6 +51,7 @@
 import distutils.version as version
 import errno
 import json
+import multiprocessing
 import os
 import random
 import re
@@ -287,7 +288,7 @@
     IMPL_PATH = b'JYTHONPATH'
 
 defaults = {
-    'jobs': ('HGTEST_JOBS', 1),
+    'jobs': ('HGTEST_JOBS', multiprocessing.cpu_count()),
     'timeout': ('HGTEST_TIMEOUT', 180),
     'slowtimeout': ('HGTEST_SLOWTIMEOUT', 500),
     'port': ('HGTEST_PORT', 20059),