Skip to content

Commit 598d066

Browse files
authored
Merge pull request #524 from gradle/erichaagdev/disable-pts
Predictive Test Selection is disabled when running builds
2 parents 711ead5 + 540d9fd commit 598d066

12 files changed

+30
-8
lines changed

Diff for: components/scripts/gradle/01-validate-incremental-building.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ execute_build() {
136136
}
137137

138138
print_gradle_command() {
139-
info "./gradlew --no-build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} $*$(print_extra_args)"
139+
info "./gradlew --no-build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false $*$(print_extra_args)"
140140
}
141141

142142
fetch_build_cache_metrics() {

Diff for: components/scripts/gradle/02-validate-local-build-caching-same-location.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ execute_build() {
141141
}
142142

143143
print_gradle_command() {
144-
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
144+
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
145145
}
146146

147147
fetch_build_cache_metrics() {

Diff for: components/scripts/gradle/03-validate-local-build-caching-different-locations.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ execute_build() {
146146
}
147147

148148
print_gradle_command() {
149-
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
149+
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
150150
}
151151

152152
fetch_build_cache_metrics() {

Diff for: components/scripts/gradle/04-validate-remote-build-caching-ci-ci.sh

+5
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
192192
checkout to avoid any build artifacts lingering around from a previous build
193193
that could influence the experiment.
194194
195+
Also, make sure the CI configuration builds the project with Predictive Test
196+
Selection (PTS) disabled, as test results will not be stored in the build cache
197+
when only a subset of tests are selected for execution. PTS can be globally
198+
disabled using the '-Dpts.enabled=false' system property.
199+
195200
Once the build completes, make a note of the commit id that was used, and enter
196201
the URL of the build scan produced by the build.
197202
EOF

Diff for: components/scripts/gradle/05-validate-remote-build-caching-ci-local.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ execute_build() {
204204
args+=(clean ${tasks})
205205

206206
info "Running build:"
207-
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
207+
info "./gradlew --build-cache -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
208208

209209
invoke_gradle 1 "${args[@]}"
210210
}
@@ -284,6 +284,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
284284
checkout to avoid any build artifacts lingering around from a previous build
285285
that could influence the experiment.
286286
287+
Also, make sure the CI configuration builds the project with Predictive Test
288+
Selection (PTS) disabled, as test results will not be stored in the build cache
289+
when only a subset of tests are selected for execution. PTS can be globally
290+
disabled using the '-Dpts.enabled=false' system property.
291+
287292
Once the build completes, make a note of the commit id that was used, and enter
288293
the URL of the build scan produced by the build.
289294
EOF

Diff for: components/scripts/lib/gradle.sh

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ invoke_gradle() {
3232
-Dcom.gradle.enterprise.build-validation.runNum="${run_num}"
3333
-Dcom.gradle.enterprise.build-validation.scriptsVersion="${SCRIPT_VERSION}"
3434
-Dscan.capture-task-input-files=true
35+
-Dpts.enabled=false
3536
)
3637

3738
# https://stackoverflow.com/a/31485948

Diff for: components/scripts/lib/maven.sh

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ invoke_maven() {
5858
-Dcom.gradle.enterprise.build-validation.runNum="${run_num}"
5959
-Dcom.gradle.enterprise.build-validation.scriptsVersion="${SCRIPT_VERSION}"
6060
-Dgradle.scan.captureGoalInputFiles=true
61+
-Dpts.enabled=false
6162
)
6263

6364
# https://stackoverflow.com/a/31485948

Diff for: components/scripts/maven/01-validate-local-build-caching-same-location.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ execute_build() {
142142
}
143143

144144
print_maven_command() {
145-
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
145+
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
146146
}
147147

148148
fetch_build_cache_metrics() {

Diff for: components/scripts/maven/02-validate-local-build-caching-different-locations.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ execute_build() {
146146
}
147147

148148
print_maven_command() {
149-
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
149+
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
150150
}
151151

152152
fetch_build_cache_metrics() {

Diff for: components/scripts/maven/03-validate-remote-build-caching-ci-ci.sh

+5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
190190
checkout to avoid any build artifacts lingering around from a previous build
191191
that could influence the experiment.
192192
193+
Also, make sure the CI configuration builds the project with Predictive Test
194+
Selection (PTS) disabled, as test results will not be stored in the build cache
195+
when only a subset of tests are selected for execution. PTS can be globally
196+
disabled using the '-Dpts.enabled=false' system property.
197+
193198
Once the build completes, make a note of the commit id that was used, and enter
194199
the URL of the build scan produced by the build.
195200
EOF

Diff for: components/scripts/maven/04-validate-remote-build-caching-ci-local.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ execute_build() {
202202
args+=(clean ${tasks})
203203

204204
info "Running build:"
205-
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} clean ${tasks}$(print_extra_args)"
205+
info "./mvnw -Dscan -Dscan.tag.${EXP_SCAN_TAG} -Dscan.value.runId=${RUN_ID} -Dpts.enabled=false clean ${tasks}$(print_extra_args)"
206206

207207
# shellcheck disable=SC2086 # we want tasks to expand with word splitting in this case
208208
invoke_maven 1 "${args[@]}"
@@ -284,6 +284,11 @@ Make sure the CI configuration uses the proper branch and performs a fresh
284284
checkout to avoid any build artifacts lingering around from a previous build
285285
that could influence the experiment.
286286
287+
Also, make sure the CI configuration builds the project with Predictive Test
288+
Selection (PTS) disabled, as test results will not be stored in the build cache
289+
when only a subset of tests are selected for execution. PTS can be globally
290+
disabled using the '-Dpts.enabled=false' system property.
291+
287292
Once the build completes, make a note of the commit id that was used, and enter
288293
the URL of the build scan produced by the build.
289294
EOF

Diff for: release/changes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- [NEW] TBD
1+
- [NEW] Predictive Test Selection is disabled when running builds

0 commit comments

Comments
 (0)