8309138: Fix container tests for jdks with symlinked conf dir

Reviewed-by: sgehwolf
This commit is contained in:
Zdenek Zambersky 2023-06-01 16:25:53 +00:00 committed by Severin Gehwolf
parent e8271649e0
commit ec55539534

View File

@ -26,6 +26,7 @@ package jdk.test.lib.containers.docker;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.FileVisitOption;
import java.nio.file.FileVisitResult;
import java.nio.file.Path;
import java.nio.file.Paths;
@ -35,6 +36,7 @@ import java.nio.file.attribute.BasicFileAttributes;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import jdk.test.lib.Container;
import jdk.test.lib.Utils;
@ -163,7 +165,7 @@ public class DockerTestUtils {
Path jdkSrcDir = Paths.get(JDK_UNDER_TEST);
Path jdkDstDir = buildDir.resolve("jdk");
Files.createDirectories(jdkDstDir);
Files.walkFileTree(jdkSrcDir, new CopyFileVisitor(jdkSrcDir, jdkDstDir));
Files.walkFileTree(jdkSrcDir, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new CopyFileVisitor(jdkSrcDir, jdkDstDir));
buildImage(imageName, buildDir);
}