Skip to content

Commit 5f7515d

Browse files
fix: logic to ignore entire suite in matrix build
My python skills "Rusty"
1 parent db6ad3d commit 5f7515d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

gen_data/gen-suite-matrix.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import glob
33
import os
44

5-
SUITES_DIR="./suites/*"
5+
SUITES_DIR="./suites"
66

77
# ARCHITECTURE CAN BE: amd64, arm64, armhf
88
# it has high priority over the architecture specified in the suite
@@ -15,11 +15,14 @@ def generate_matrix_json() -> str:
1515
json_data = { "include": [ ] }
1616

1717
for arch in ARCHITECTURES:
18-
for variantPath in glob.iglob(f"{SUITES_DIR}/*", recursive=False):
18+
for variantPath in glob.iglob(f"{SUITES_DIR}/*/*", recursive=False):
1919
suiteName = variantPath.split('/')[2]
2020
variantName = variantPath.split('/')[3]
21-
22-
if os.path.exists(f"{variantPath}/.no-matrix-build") or os.path.exists(f"{SUITES_DIR}/{suiteName}/.no-matrix-build"):
21+
22+
if os.path.exists(f"{SUITES_DIR}/{suiteName}/.no-matrix-build"):
23+
continue
24+
25+
if os.path.exists(f"{variantPath}/.no-matrix-build"):
2326
continue
2427

2528
element = { }

0 commit comments

Comments
 (0)