Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lit] Allow setting parallelism groups to None
Check that we do not crash if a parallelism group is explicitly set to None. Permits usage of the following pattern. [lit.common.cfg] lit_config.parallelism_groups['my_group'] = None if <condition>: lit_config.parallelism_groups['my_group'] = 3 [project/lit.cfg] config.parallelism_group = 'my_group' Reviewers: rnk Differential Revision: https://reviews.llvm.org/D58305 llvm-svn: 354912
- Loading branch information
Showing
6 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import lit.formats | ||
config.name = 'parallelism-groups' | ||
config.suffixes = ['.txt'] | ||
config.test_format = lit.formats.ShTest() | ||
config.test_source_root = None | ||
config.test_exec_root = None | ||
|
||
# Should not crash | ||
lit_config.parallelism_groups['my_group'] = None | ||
|
||
config.parallelism_group = 'my_group' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# RUN: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# RUN: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Check that we do not crash if a parallelism group is set to None. Permits | ||
# usage of the following pattern. | ||
# | ||
# [lit.common.cfg] | ||
# lit_config.parallelism_groups['my_group'] = None | ||
# if <condition>: | ||
# lit_config.parallelism_groups['my_group'] = 3 | ||
# | ||
# [project/lit.cfg] | ||
# config.parallelism_group = 'my_group' | ||
# | ||
# Note: We need at least 2 tests to prevent lit from using "single process | ||
# mode", which ignores parallelism groups. | ||
# | ||
|
||
# RUN: %{lit} -j2 %{inputs}/parallelism-groups | FileCheck %s | ||
|
||
# CHECK: -- Testing: 2 tests, 2 threads -- | ||
# CHECK-DAG: PASS: parallelism-groups :: test1.txt | ||
# CHECK-DAG: PASS: parallelism-groups :: test2.txt | ||
# CHECK: Expected Passes : 2 |