8196590: Enable docker container related tests for linux AARCH64

Add test bits required for aarch64

Reviewed-by: mseledtsov, mbaesken, sspitsyn
This commit is contained in:
Dmitry Samersoff 2018-03-03 10:15:23 +00:00
parent c61f11a3ab
commit 87372c6236
2 changed files with 34 additions and 10 deletions
test
hotspot/jtreg/runtime/containers/docker
jtreg-ext/requires

@ -0,0 +1,8 @@
# Use generic ubuntu Linux on AArch64
FROM aarch64/ubuntu
COPY /jdk /jdk
ENV JAVA_HOME=/jdk
CMD ["/bin/bash"]

@ -366,18 +366,34 @@ 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, Linux-s390x and Linux-ppc64le
String arch = System.getProperty("os.arch");
if (! (Platform.isLinux() && (Platform.isX64() || Platform.isS390x() || arch.equals("ppc64le")))) {
return "false";
boolean isSupported = false;
if (Platform.isLinux()) {
// currently docker testing is only supported for Linux,
// on certain platforms
String arch = System.getProperty("os.arch");
if (Platform.isX64()) {
isSupported = true;
}
else if (Platform.isAArch64()) {
isSupported = true;
}
else if (Platform.isS390x()) {
isSupported = true;
}
else if (arch.equals("ppc64le")) {
isSupported = true;
}
}
boolean isSupported;
try {
isSupported = checkDockerSupport();
} catch (Exception e) {
isSupported = false;
}
if (isSupported) {
try {
isSupported = checkDockerSupport();
} catch (Exception e) {
isSupported = false;
}
}
return (isSupported) ? "true" : "false";
}