mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11568 from JuhPuur/unittest_speedup
Speed up unit test build with parallel jobspull/11590/head
commit
60a8a9dafb
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue