jdk/test/tools/launcher/modules/patch/basic/PatchTest.java
author mchung
Thu, 19 May 2016 11:17:35 -0700
changeset 38431 ed73e79a0eb4
parent 37779 jdk/test/tools/launcher/modules/patch/PatchTest.java@7c84df693837
child 38749 90c9aeef923a
permissions -rw-r--r--
8157068: ExceptionInInitializerError if images build patched to use exploded version of jdk.internal.module.SystemModules Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     2
 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * accompanied this code).
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * questions.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    23
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    24
/**
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
 * @test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
 * @library /lib/testlibrary
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
 * @modules jdk.compiler
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
    28
 * @build PatchTest CompilerUtils JarUtils jdk.testlibrary.*
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    29
 * @run testng PatchTest
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    30
 * @summary Basic test for -Xpatch
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    32
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    33
import java.io.File;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    34
import java.nio.file.Files;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    35
import java.nio.file.Path;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    36
import java.nio.file.Paths;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    37
import java.util.stream.Collectors;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    38
import java.util.stream.Stream;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    39
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    40
import static jdk.testlibrary.ProcessTools.*;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    41
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    42
import org.testng.annotations.BeforeTest;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    43
import org.testng.annotations.Test;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    44
import static org.testng.Assert.*;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    45
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    46
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    47
/**
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    48
 * Compiles and launches a test that uses -Xpatch with two directories of
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    49
 * classes to override existing and add new classes to modules in the
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    50
 * boot layer.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    51
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    52
 * The classes overridden or added via -Xpatch all define a public no-arg
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    53
 * constructor and override toString to return "hi". This allows the launched
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    54
 * test to check that the overridden classes are loaded.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    55
 */
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    56
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    57
@Test
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    58
public class PatchTest {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    59
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    60
    // top-level source directory
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    61
    private static final String TEST_SRC = System.getProperty("test.src");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    62
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    63
    // source/destination tree for the test module
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    64
    private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    65
    private static final Path MODS_DIR = Paths.get("mods");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    66
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    67
    // source/destination tree for patch tree 1
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    68
    private static final Path SRC1_DIR = Paths.get(TEST_SRC, "src1");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    69
    private static final Path PATCHES1_DIR = Paths.get("patches1");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    70
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    71
    // source/destination tree for patch tree 2
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    72
    private static final Path SRC2_DIR = Paths.get(TEST_SRC, "src2");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    73
    private static final Path PATCHES2_DIR = Paths.get("patches2");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    74
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
    75
    // destination directory for patches packaged as JAR files
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
    76
    private static final Path PATCHES_DIR = Paths.get("patches");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
    77
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    78
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    79
    // the classes overridden or added with -Xpatch
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    80
    private static final String[] CLASSES = {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    81
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    82
        // java.base = boot loader
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    83
        "java.base/java.text.Annotation",           // override class
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    84
        "java.base/java.text.AnnotationBuddy",      // add class to package
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    85
        "java.base/java.lang2.Object",              // new package
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    86
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    87
        // jdk.naming.dns = platform class loader
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    88
        "jdk.naming.dns/com.sun.jndi.dns.DnsClient",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    89
        "jdk.naming.dns/com.sun.jndi.dns.DnsClientBuddy",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    90
        "jdk.naming.dns/com.sun.jndi.dns2.Zone",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    91
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    92
        // jdk.compiler = application class loaded
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    93
        "jdk.compiler/com.sun.tools.javac.Main",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    94
        "jdk.compiler/com.sun.tools.javac.MainBuddy",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    95
        "jdk.compiler/com.sun.tools.javac2.Main",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    96
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    97
    };
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    98
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    99
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   100
    @BeforeTest
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   101
    public void setup() throws Exception {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   102
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   103
        // javac -d mods/test src/test/**
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   104
        boolean compiled= CompilerUtils.compile(SRC_DIR.resolve("test"),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   105
                                                MODS_DIR.resolve("test"));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   106
        assertTrue(compiled, "classes did not compile");
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   107
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   108
        // javac -Xmodule:$MODULE -d patches1/$MODULE patches1/$MODULE/**
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   109
        // jar cf patches/$MODULE-1.jar -C patches1/$MODULE .
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   110
        for (Path src : Files.newDirectoryStream(SRC1_DIR)) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   111
            Path output = PATCHES1_DIR.resolve(src.getFileName());
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   112
            String mn = src.getFileName().toString();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   113
            compiled  = CompilerUtils.compile(src, output, "-Xmodule:" + mn);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   114
            assertTrue(compiled, "classes did not compile");
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   115
            JarUtils.createJarFile(PATCHES_DIR.resolve(mn + "-1.jar"), output);
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   116
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   117
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   118
        // javac -Xmodule:$MODULE -d patches2/$MODULE patches2/$MODULE/**
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   119
        // jar cf patches/$MODULE-2.jar -C patches2/$MODULE .
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   120
        for (Path src : Files.newDirectoryStream(SRC2_DIR)) {
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   121
            Path output = PATCHES2_DIR.resolve(src.getFileName());
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   122
            String mn = src.getFileName().toString();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   123
            compiled  = CompilerUtils.compile(src, output, "-Xmodule:" + mn);
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   124
            assertTrue(compiled, "classes did not compile");
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   125
            JarUtils.createJarFile(PATCHES_DIR.resolve(mn + "-2.jar"), output);
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   126
        }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   127
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   128
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   129
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   130
    /**
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   131
     * Run test with patches to java.base, jdk.naming.dns and jdk.compiler
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   132
     */
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   133
    void runTest(String basePatches, String dnsPatches, String compilerPatches)
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   134
        throws Exception
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   135
    {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   136
        // the argument to the test is the list of classes overridden or added
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   137
        String arg = Stream.of(CLASSES).collect(Collectors.joining(","));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   138
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   139
        int exitValue
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   140
            =  executeTestJava("-Xpatch:java.base=" + basePatches,
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   141
                               "-Xpatch:jdk.naming.dns=" + dnsPatches,
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   142
                               "-Xpatch:jdk.compiler=" + compilerPatches,
36928
71f5c0728dfc 8153370: Drop use of old style -XaddExports from tests
alanb
parents: 36511
diff changeset
   143
                               "-XaddExports:java.base/java.lang2=test",
71f5c0728dfc 8153370: Drop use of old style -XaddExports from tests
alanb
parents: 36511
diff changeset
   144
                               "-XaddExports:jdk.naming.dns/com.sun.jndi.dns=test",
71f5c0728dfc 8153370: Drop use of old style -XaddExports from tests
alanb
parents: 36511
diff changeset
   145
                               "-XaddExports:jdk.naming.dns/com.sun.jndi.dns2=test",
71f5c0728dfc 8153370: Drop use of old style -XaddExports from tests
alanb
parents: 36511
diff changeset
   146
                               "-XaddExports:jdk.compiler/com.sun.tools.javac2=test",
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   147
                               "-addmods", "jdk.naming.dns,jdk.compiler",
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   148
                               "-mp", MODS_DIR.toString(),
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   149
                               "-m", "test/jdk.test.Main", arg)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   150
                .outputTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   151
                .errorTo(System.out)
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   152
                .getExitValue();
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   153
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   154
        assertTrue(exitValue == 0);
37779
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   155
    }
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   156
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   157
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   158
    /**
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   159
     * Run test with -Xpatch and exploded patches
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   160
     */
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   161
    public void testWithExplodedPatches() throws Exception {
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   162
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   163
        // patches1/java.base:patches2/java.base
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   164
        String basePatches = PATCHES1_DIR.resolve("java.base")
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   165
                + File.pathSeparator + PATCHES2_DIR.resolve("java.base");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   166
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   167
        String dnsPatches = PATCHES1_DIR.resolve("jdk.naming.dns")
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   168
                + File.pathSeparator + PATCHES2_DIR.resolve("jdk.naming.dns");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   169
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   170
        String compilerPatches = PATCHES1_DIR.resolve("jdk.compiler")
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   171
                + File.pathSeparator + PATCHES2_DIR.resolve("jdk.compiler");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   172
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   173
        runTest(basePatches, dnsPatches, compilerPatches);
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   174
    }
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   175
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   176
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   177
    /**
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   178
     * Run test with -Xpatch and patches in JAR files
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   179
     */
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   180
    public void testWitJarPatches() throws Exception {
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   181
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   182
        // patches/java.base-1.jar:patches/java-base-2.jar
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   183
        String basePatches = PATCHES_DIR.resolve("java.base-1.jar")
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   184
                + File.pathSeparator + PATCHES_DIR.resolve("java.base-2.jar");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   185
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   186
        String dnsPatches = PATCHES_DIR.resolve("jdk.naming.dns-1.jar")
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   187
                +  File.pathSeparator + PATCHES_DIR.resolve("jdk.naming.dns-2.jar");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   188
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   189
        String compilerPatches = PATCHES_DIR.resolve("jdk.compiler-1.jar")
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   190
                +  File.pathSeparator + PATCHES_DIR.resolve("jdk.compiler-2.jar");
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   191
7c84df693837 8154956: Module system implementation refresh (4/2016)
alanb
parents: 36928
diff changeset
   192
        runTest(basePatches, dnsPatches, compilerPatches);
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   193
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   194
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   195
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
   196
}