Speed up unit test build with parallel jobs

pull/11568/head
Juhani Puurula 2019-09-26 12:14:56 +03:00
parent 28a0e3c9b7
commit b836256701
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")