author | herrick |
Thu, 06 Jun 2019 19:31:11 -0400 | |
branch | JDK-8200758-branch |
changeset 57395 | 521c02b9eed0 |
parent 57307 | 4948a1944cf9 |
child 57414 | 6eda749d3117 |
permissions | -rw-r--r-- |
57307 | 1 |
/* |
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
57307 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
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 |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
26 |
* @summary jpackage create image modular jar test |
57307 | 27 |
* @library ../helpers |
28 |
* @build JPackageHelper |
|
29 |
* @build JPackagePath |
|
30 |
* @build JPackageCreateAppImageBase |
|
31 |
* @modules jdk.jpackage |
|
32 |
* @run main/othervm -Xmx512m JPackageCreateAppImageModuleTest |
|
33 |
*/ |
|
34 |
public class JPackageCreateAppImageModuleTest { |
|
35 |
private static final String OUTPUT = "output"; |
|
36 |
||
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
37 |
private static final String [] CMD1 = { |
57307 | 38 |
"create-app-image", |
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
39 |
"--module-path", "module", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
40 |
"--module", "com.other/com.other.Other", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
41 |
"--output", OUTPUT, |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
42 |
"--name", "test", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
43 |
}; |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
44 |
|
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
45 |
private static String [] commands = { |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
46 |
"create-app-image", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
47 |
"--module-path", "module", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
48 |
"--module", "com.other/com.other.Other", |
57307 | 49 |
"--output", OUTPUT, |
50 |
"--name", "test", |
|
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
51 |
"--add-modules", "TBD", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
52 |
}; |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
53 |
|
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
54 |
private final static String [] paths = { |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
55 |
"ALL-MODULES", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
56 |
"ALL_MODULE_PATH", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
57 |
"ALL-SYSTEM", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
58 |
"ALL-DEFAULT", |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
59 |
}; |
57307 | 60 |
|
61 |
public static void main(String[] args) throws Exception { |
|
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
62 |
JPackageHelper.createOtherModule(); |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
63 |
|
57307 | 64 |
JPackageHelper.deleteOutputFolder(OUTPUT); |
57395
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
65 |
JPackageCreateAppImageBase.testCreateAppImage(CMD1); |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
66 |
|
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
67 |
for (String path : paths) { |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
68 |
commands[commands.length - 1] = path; |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
69 |
System.out.println("using --add-modules " + path); |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
70 |
JPackageHelper.deleteOutputFolder(OUTPUT); |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
71 |
JPackageCreateAppImageBase.testCreateAppImageToolProvider(commands); |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
72 |
System.out.println("succeeded"); |
521c02b9eed0
8224130: create additional automated tests for create-app-image
herrick
parents:
57307
diff
changeset
|
73 |
} |
57307 | 74 |
} |
75 |
||
76 |
} |