Skip to content

Commit 6f9da4c

Browse files
committed
fix: buildSrc result files were never collected
1 parent 7c14c0b commit 6f9da4c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.gitlab/collect_results.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ WORKSPACE_DIR=workspace
1212
mkdir -p $TEST_RESULTS_DIR
1313
mkdir -p $WORKSPACE_DIR
1414

15-
mapfile -t TEST_RESULT_DIRS < <(find $WORKSPACE_DIR -name test-results -type d)
15+
# Main project modules redirect their build directory to workspace/<project-path>/build/ in CI
16+
# (see build.gradle.kts layout.buildDirectory override). buildSrc is a separate Gradle build
17+
# that runs before the main build is configured, so this redirect never applies to it;
18+
# its test results always land in buildSrc/**/build/test-results/, not under workspace/.
19+
SEARCH_DIRS=($WORKSPACE_DIR buildSrc)
20+
21+
mapfile -t TEST_RESULT_DIRS < <(find "${SEARCH_DIRS[@]}" -name test-results -type d)
1622

1723
if [[ ${#TEST_RESULT_DIRS[@]} -eq 0 ]]; then
1824
echo "No test results found"

0 commit comments

Comments
 (0)