--- a/test/jdk/tools/jpackage/share/RuntimePackageTest.java Mon Sep 16 19:24:32 2019 -0400
+++ b/test/jdk/tools/jpackage/share/RuntimePackageTest.java Tue Sep 24 13:41:16 2019 -0400
@@ -21,7 +21,11 @@
* questions.
*/
+import java.nio.file.Path;
+import java.util.Optional;
+import jdk.jpackage.test.Test;
import jdk.jpackage.test.PackageTest;
+import jdk.jpackage.test.JPackageCommand;
/**
* Test --runtime-image parameter.
@@ -41,21 +45,25 @@
* @summary jpackage with --runtime-image
* @library ../helpers
* @comment Temporary disable for Linux and OSX until functionality implemented
- * @requires (os.family == "windows")
+ * @requires (os.family != "mac")
* @modules jdk.jpackage/jdk.jpackage.internal
- * @run main/othervm -Xmx512m RuntimePackageTest
+ * @run main/othervm/timeout=360 -Xmx512m RuntimePackageTest
*/
public class RuntimePackageTest {
public static void main(String[] args) {
- new PackageTest()
- .addInitializer(cmd -> {
- cmd.addArguments("--runtime-image", System.getProperty("java.home"));
- // Remove --input parameter from jpackage command line as we don't
- // create input directory in the test and jpackage fails
- // if --input references non existant directory.
- cmd.setArgumentValue("--input", null);
- })
- .run();
+ Test.run(args, () -> {
+ new PackageTest()
+ .addInitializer(cmd -> {
+ cmd.addArguments("--runtime-image", Optional.ofNullable(
+ JPackageCommand.DEFAULT_RUNTIME_IMAGE).orElse(Path.of(
+ System.getProperty("java.home"))));
+ // Remove --input parameter from jpackage command line as we don't
+ // create input directory in the test and jpackage fails
+ // if --input references non existant directory.
+ cmd.removeArgument("--input");
+ })
+ .run();
+ });
}
}