Skip to content

Commit 22ee111

Browse files
committed
Don't track absolute path as test input to improve cacheability (#52235)
1 parent 77c8516 commit 22ee111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,7 @@ class BuildPlugin implements Plugin<Project> {
732732
test.jvmArgs '-ea', '-esa'
733733
}
734734

735-
test.systemProperties 'gradle.dist.lib': new File(project.class.location.toURI()).parent,
736-
'java.awt.headless': 'true',
735+
test.systemProperties 'java.awt.headless': 'true',
737736
'tests.gradle': 'true',
738737
'tests.artifact': project.name,
739738
'tests.task': test.path,
@@ -748,6 +747,7 @@ class BuildPlugin implements Plugin<Project> {
748747
}
749748

750749
// don't track these as inputs since they contain absolute paths and break cache relocatability
750+
nonInputProperties.systemProperty('gradle.dist.lib', new File(project.class.location.toURI()).parent)
751751
nonInputProperties.systemProperty('gradle.worker.jar', "${project.gradle.getGradleUserHomeDir()}/caches/${project.gradle.gradleVersion}/workerMain/gradle-worker.jar")
752752
nonInputProperties.systemProperty('gradle.user.home', project.gradle.getGradleUserHomeDir())
753753
// we use 'temp' relative to CWD since this is per JVM and tests are forbidden from writing to CWD

0 commit comments

Comments
 (0)