Skip to content

Commit 69b92d4

Browse files
authored
Merge pull request #526 from vpodzime/master-fix_only_exotics
Fix getting configuration filter for exotics only
2 parents c554497 + de2db79 commit 69b92d4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

build-scripts/get_labels_expr.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,20 @@ def get_labels_from_file(f_path):
3939
yield label
4040

4141
def main(labels_f_path, exotics_f_path, run_on_exotics, only_exotics):
42+
all_labels = set()
43+
exotics = set()
44+
for label in get_labels_from_file(labels_f_path):
45+
all_labels.add(label.strip())
46+
for label in get_labels_from_file(exotics_f_path):
47+
exotics.add(label.strip())
48+
4249
labels_to_run = set()
4350
if only_exotics:
44-
for label in get_labels_from_file(exotics_f_path):
45-
labels_to_run.add(label.strip())
51+
labels_to_run = all_labels.intersection(exotics)
52+
elif not run_on_exotics:
53+
labels_to_run = all_labels.difference(exotics)
4654
else:
47-
for label in get_labels_from_file(labels_f_path):
48-
labels_to_run.add(label.strip())
49-
if not run_on_exotics:
50-
for label in get_labels_from_file(exotics_f_path):
51-
labels_to_run.discard(label.strip())
55+
labels_to_run = all_labels
5256

5357
print("(", end="")
5458
labels_eqs = ('label == "%s"' % label for label in sorted(labels_to_run))

0 commit comments

Comments
 (0)