Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hotspot/test/TEST.groups
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ hotspot_wbapitest = \
hotspot_compiler = \
sanity/ExecuteInternalVMTests.java

hotspot_containers = \
containers

hotspot_gc = \
sanity/ExecuteInternalVMTests.java \
-gc/g1/TestGreyReclaimedHumongousObjects.java
Expand Down Expand Up @@ -260,6 +263,7 @@ compact1_minimal = \
testlibrary/ \
sanity/ \
runtime/ \
containers/ \
gc/ \
-:needs_full_vm_compact1 \
-:needs_full_vm_compact2 \
Expand Down
18 changes: 13 additions & 5 deletions test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import jdk.test.lib.Utils;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jtreg.SkippedException;


public class DockerTestUtils {
Expand Down Expand Up @@ -90,9 +91,7 @@ public static boolean canTestDocker() throws Exception {
if (isDockerEngineAvailable()) {
return true;
} else {
System.out.println("Docker engine is not available on this system");
System.out.println("This test is SKIPPED");
return false;
throw new SkippedException("Docker engine is not available on this system");
}
}

Expand Down Expand Up @@ -171,8 +170,17 @@ private static boolean isDockerEngineAvailableCheck() throws Exception {
DockerfileConfig.getBaseImageVersion());

// Build the docker
execute(Container.ENGINE_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString())
.shouldHaveExitValue(0);
try {
// Build the docker
execute(Container.ENGINE_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString())
.shouldHaveExitValue(0)
.shouldContain("Successfully built");
} catch (Exception e) {
// If docker image building fails there is a good chance it happens due to environment and/or
// configuration other than product failure. Throw jtreg skipped exception in such case
// instead of failing the test.
throw new SkippedException("Building docker image failed. Details: \n" + e.getMessage());
}
}


Expand Down