19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 import jdk.jpackage.test.Test; |
24 import jdk.jpackage.test.TKit; |
25 import jdk.jpackage.test.PackageTest; |
25 import jdk.jpackage.test.PackageTest; |
26 import jdk.jpackage.test.PackageType; |
26 import jdk.jpackage.test.PackageType; |
27 |
27 |
28 |
28 |
29 /** |
29 /** |
43 |
43 |
44 /* |
44 /* |
45 * @test |
45 * @test |
46 * @summary jpackage with --linux-package-deps |
46 * @summary jpackage with --linux-package-deps |
47 * @library ../helpers |
47 * @library ../helpers |
|
48 * @build jdk.jpackage.test.* |
48 * @requires (os.family == "linux") |
49 * @requires (os.family == "linux") |
49 * @modules jdk.jpackage/jdk.jpackage.internal |
50 * @modules jdk.jpackage/jdk.jpackage.internal |
50 * @run main/othervm/timeout=360 -Xmx512m PackageDepsTest |
51 * @run main/othervm/timeout=360 -Xmx512m PackageDepsTest |
51 */ |
52 */ |
52 public class PackageDepsTest { |
53 public class PackageDepsTest { |
53 |
54 |
54 // Pick the name of prerequisite package to be alphabetically |
|
55 // preceeding the main package name. |
|
56 // This is needed to make Bash script batch installing/uninstalling packages |
|
57 // produced by jtreg tests install/uninstall packages in the right order. |
|
58 static class APackageDepsTestPrereq { |
|
59 |
|
60 public static void main(String[] args) { |
|
61 new PackageTest().forTypes(PackageType.LINUX).configureHelloApp().run(); |
|
62 } |
|
63 } |
|
64 |
|
65 public static void main(String[] args) { |
55 public static void main(String[] args) { |
|
56 // Pick the name of prerequisite package to be alphabetically |
|
57 // preceeding the main package name. |
|
58 // This is needed to make Bash script batch installing/uninstalling packages |
|
59 // produced by jtreg tests install/uninstall packages in the right order. |
66 final String PREREQ_PACKAGE_NAME = "apackagedepstestprereq"; |
60 final String PREREQ_PACKAGE_NAME = "apackagedepstestprereq"; |
67 |
61 |
68 Test.run(args, () -> { |
62 TKit.run(args, () -> { |
69 APackageDepsTestPrereq.main(args); |
63 new PackageTest() |
|
64 .forTypes(PackageType.LINUX) |
|
65 .configureHelloApp() |
|
66 .addInitializer(cmd -> { |
|
67 cmd.setArgumentValue("--name", PREREQ_PACKAGE_NAME); |
|
68 }) |
|
69 .run(); |
70 |
70 |
71 new PackageTest() |
71 new PackageTest() |
72 .forTypes(PackageType.LINUX) |
72 .forTypes(PackageType.LINUX) |
73 .configureHelloApp() |
73 .configureHelloApp() |
74 .addInitializer(cmd -> { |
74 .addInitializer(cmd -> { |