diff --git a/UNITTESTS/unit_test/test.py b/UNITTESTS/unit_test/test.py index dbf515e4e0..5df0fd1c5e 100644 --- a/UNITTESTS/unit_test/test.py +++ b/UNITTESTS/unit_test/test.py @@ -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")