Skip to content

Commit fb56a44

Browse files
committed
Add test_suite_max_parallel option to LLVM
Allow to limit number of parallel test tasks.
1 parent 9b74168 commit fb56a44

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

easybuild/easyblocks/l/llvm.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ def extra_options():
230230
'test_suite_ignore_patterns': [None, "List of test to ignore (if the string matches)", CUSTOM],
231231
'test_suite_ignore_timeouts': [False, "Do not treat timedoud tests as failures", CUSTOM],
232232
'test_suite_max_failed': [0, "Maximum number of failing tests (does not count allowed failures)", CUSTOM],
233+
'test_suite_max_parallel': [None, "Maximum number LIT tasks to use for tests. "
234+
"Limitted by the global parallel setting.", CUSTOM],
233235
'test_suite_timeout_single': [None, "Timeout for each individual test in the test suite", CUSTOM],
234236
'test_suite_timeout_total': [None, "Timeout for total running time of the testsuite", CUSTOM],
235237
'use_pic': [True, "Build with Position Independent Code (PIC)", CUSTOM],
@@ -599,9 +601,13 @@ def _configure_final_build(self):
599601
# OMPT based tools
600602
self._cmakeopts['OPENMP_ENABLE_OMPT_TOOLS'] = ompt_value
601603

602-
# Make sure tests are not running with more than 'parallel' tasks
604+
# Set parallel LIT tasks. Limit by set max-parallelism and in absence of that
605+
# use --mpi-tests to determine if parallelism is desired.
603606
parallel = self.cfg.parallel
604-
if not build_option('mpi_tests'):
607+
max_parallel = self.cfg['test_suite_max_parallel']
608+
if max_parallel:
609+
parallel = min(max_parallel, parallel)
610+
elif not build_option('mpi_tests'):
605611
parallel = 1
606612
lit_args = [f'-j {parallel}']
607613
if self.cfg['debug_tests']:

0 commit comments

Comments
 (0)