8197412: Enable docker container related tests for linux s390x

Reviewed-by: goetz, dsamersoff
This commit is contained in:
Matthias Baesken 2018-02-09 10:18:19 +01:00
parent 7ca917e9bd
commit 9465174f72
4 changed files with 11 additions and 3 deletions

View File

@ -0,0 +1,7 @@
FROM s390x/ubuntu
COPY /jdk /jdk
ENV JAVA_HOME=/jdk
CMD ["/bin/bash"]

View File

@ -26,6 +26,7 @@
* @test
* @summary Test JVM's awareness of cpu sets (cpus and mems)
* @requires docker.support
* @requires (os.arch != "s390x")
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management

View File

@ -352,9 +352,9 @@ public class VMProps implements Callable<Map<String, String>> {
* @return true if docker is supported in a given environment
*/
protected String dockerSupport() {
// currently docker testing is only supported for Linux-x64 and Linux-ppc64le
// currently docker testing is only supported for Linux-x64, Linux-s390x and Linux-ppc64le
String arch = System.getProperty("os.arch");
if (! (Platform.isLinux() && (Platform.isX64() || arch.equals("ppc64le")))) {
if (! (Platform.isLinux() && (Platform.isX64() || Platform.isS390x() || arch.equals("ppc64le")))) {
return "false";
}

View File

@ -161,7 +161,7 @@ public class DockerTestUtils {
Files.copy(dockerfile, buildDir.resolve("Dockerfile"));
// Build the docker
execute("docker", "build", buildDir.toString(), "--no-cache", "--tag", imageName)
execute("docker", "build", "--no-cache", "--tag", imageName, buildDir.toString())
.shouldHaveExitValue(0)
.shouldContain("Successfully built");
}