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
26 * @bug 8157068 8177844
27 * @summary Patch java.base and user module with ModuleHashes attribute
28 * @library /lib/testlibrary /test/lib
29 * @modules jdk.compiler
30 * @build CompilerUtils
31 * @run testng PatchSystemModules
32 */
33
34 import java.io.File;
35 import java.nio.file.Files;
36 import java.nio.file.Path;
37 import java.nio.file.Paths;
38 import java.util.ArrayList;
39 import java.util.List;
40 import java.util.stream.Stream;
41
42 import jdk.test.lib.util.FileUtils;
43 import jdk.testlibrary.JDKToolFinder;
44 import org.testng.annotations.BeforeTest;
45 import org.testng.annotations.Test;
46
47 import static jdk.testlibrary.ProcessTools.executeCommand;
48 import static org.testng.Assert.*;
49
50 public class PatchSystemModules {
51 private static final String JAVA_HOME = System.getProperty("java.home");
52
53 private static final Path TEST_SRC = Paths.get(System.getProperty("test.src"));
54
55 private static final Path JMODS = Paths.get(JAVA_HOME, "jmods");
56 private static final Path MODS_DIR = Paths.get("mods");
57 private static final Path JARS_DIR = Paths.get("jars");
58 private static final Path PATCH_DIR = Paths.get("patches");
59 private static final Path IMAGE = Paths.get("image");
60 private static final Path NEW_M1_JAR = JARS_DIR.resolve("new_m1.jar");
61
|
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
26 * @bug 8157068 8177844
27 * @summary Patch java.base and user module with ModuleHashes attribute
28 * @library /lib/testlibrary /test/lib
29 * @modules jdk.compiler
30 * @build jdk.test.lib.compiler.CompilerUtils
31 * @run testng PatchSystemModules
32 */
33
34 import java.io.File;
35 import java.nio.file.Files;
36 import java.nio.file.Path;
37 import java.nio.file.Paths;
38 import java.util.ArrayList;
39 import java.util.List;
40 import java.util.stream.Stream;
41
42 import jdk.test.lib.compiler.CompilerUtils;
43 import jdk.test.lib.util.FileUtils;
44 import jdk.testlibrary.JDKToolFinder;
45 import org.testng.annotations.BeforeTest;
46 import org.testng.annotations.Test;
47
48 import static jdk.testlibrary.ProcessTools.executeCommand;
49 import static org.testng.Assert.*;
50
51 public class PatchSystemModules {
52 private static final String JAVA_HOME = System.getProperty("java.home");
53
54 private static final Path TEST_SRC = Paths.get(System.getProperty("test.src"));
55
56 private static final Path JMODS = Paths.get(JAVA_HOME, "jmods");
57 private static final Path MODS_DIR = Paths.get("mods");
58 private static final Path JARS_DIR = Paths.get("jars");
59 private static final Path PATCH_DIR = Paths.get("patches");
60 private static final Path IMAGE = Paths.get("image");
61 private static final Path NEW_M1_JAR = JARS_DIR.resolve("new_m1.jar");
62
|