Fix file path when looking for docker exclusions file (#105304)

This commit is contained in:
Mark Vieira 2024-02-08 12:27:09 -08:00 committed by GitHub
parent 97dbb2a27e
commit 6c4e55e714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 21 deletions

View file

@ -144,6 +144,7 @@ public class ElasticsearchTestBasePlugin implements Plugin<Project> {
// don't track these as inputs since they contain absolute paths and break cache relocatability
File gradleUserHome = project.getGradle().getGradleUserHomeDir();
nonInputProperties.systemProperty("gradle.user.home", gradleUserHome);
nonInputProperties.systemProperty("workspace.dir", Util.locateElasticsearchWorkspace(project.getGradle()));
// we use 'temp' relative to CWD since this is per JVM and tests are forbidden from writing to CWD
nonInputProperties.systemProperty("java.io.tmpdir", test.getWorkingDir().toPath().resolve("temp"));

View file

@ -115,7 +115,7 @@ public abstract class DockerEnvironmentAwareTestContainer extends GenericContain
}
private static List<String> getLinuxExclusionList() {
File exclusionsFile = new File(DOCKER_ON_LINUX_EXCLUSIONS_FILE);
File exclusionsFile = new File(System.getProperty("workspace.dir"), DOCKER_ON_LINUX_EXCLUSIONS_FILE);
if (exclusionsFile.exists()) {
try {
return Files.readAllLines(exclusionsFile.toPath())