8197412: Enable docker container related tests for linux s390x
authormbaesken
Fri, 09 Feb 2018 10:18:19 +0100
changeset 48957 af49718d8cf2
parent 48956 400f4d17a3c6
child 48958 2974041b684f
8197412: Enable docker container related tests for linux s390x Reviewed-by: goetz, dsamersoff
test/hotspot/jtreg/runtime/containers/docker/Dockerfile-BasicTest-s390x
test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java
test/jtreg-ext/requires/VMProps.java
test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/containers/docker/Dockerfile-BasicTest-s390x	Fri Feb 09 10:18:19 2018 +0100
@@ -0,0 +1,7 @@
+FROM s390x/ubuntu
+
+COPY /jdk /jdk
+
+ENV JAVA_HOME=/jdk
+
+CMD ["/bin/bash"]
--- a/test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java	Mon Feb 12 15:29:35 2018 +0100
+++ b/test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java	Fri Feb 09 10:18:19 2018 +0100
@@ -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
--- a/test/jtreg-ext/requires/VMProps.java	Mon Feb 12 15:29:35 2018 +0100
+++ b/test/jtreg-ext/requires/VMProps.java	Fri Feb 09 10:18:19 2018 +0100
@@ -352,9 +352,9 @@
      * @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";
         }
 
--- a/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java	Mon Feb 12 15:29:35 2018 +0100
+++ b/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java	Fri Feb 09 10:18:19 2018 +0100
@@ -161,7 +161,7 @@
         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");
     }