Skip to content

Commit b836256

Browse files
author
Juhani Puurula
committed
Speed up unit test build with parallel jobs
1 parent 28a0e3c commit b836256

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

UNITTESTS/unit_test/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import os
2222
import logging
2323
import sys
24+
import psutil
2425
from shutil import copy
2526

2627
from .utils import execute_program
@@ -106,6 +107,11 @@ def build_tests(self):
106107

107108
args = [self.make_program]
108109

110+
# Speed up compilation by running on more than one core
111+
count = psutil.cpu_count()
112+
args.append("-j{}".format(count+1))
113+
args.append("-l{}".format(count))
114+
109115
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
110116
args.append("VERBOSE=1")
111117

0 commit comments

Comments
 (0)