Merge pull request #11568 from JuhPuur/unittest_speedup

Speed up unit test build with parallel jobs
pull/11590/head
Anna Bridge 2019-09-27 13:29:18 +01:00 committed by GitHub
commit 60a8a9dafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@ UNIT TEST BUILD & RUN
import os
import logging
import sys
import psutil
from shutil import copy
from .utils import execute_program
@ -106,6 +107,11 @@ class UnitTestTool(object):
args = [self.make_program]
# Speed up compilation by running on more than one core
count = psutil.cpu_count()
args.append("-j{}".format(count+1))
args.append("-l{}".format(count))
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
args.append("VERBOSE=1")