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 import java.io.File;
25 import java.io.PrintWriter;
26 import java.io.StringWriter;
27 import java.nio.file.Files;
28 import java.nio.file.Path;
29 import java.nio.file.Paths;
30 import java.util.ArrayList;
31 import java.util.List;
32 import java.util.spi.ToolProvider;
33 import java.util.stream.Collectors;
34 import java.util.stream.Stream;
35
36 import org.testng.annotations.BeforeTest;
37 import org.testng.annotations.Test;
38 import static org.testng.Assert.*;
39
40 /**
41 * @test
42 * @bug 8174826
43 * @library /lib/testlibrary
44 * @modules jdk.charsets jdk.compiler jdk.jlink
45 * @build SuggestProviders CompilerUtils
46 * @run testng SuggestProviders
47 */
48
49 public class SuggestProviders {
50 private static final String JAVA_HOME = System.getProperty("java.home");
51 private static final String TEST_SRC = System.getProperty("test.src");
52
53 private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
54 private static final Path MODS_DIR = Paths.get("mods");
55
56 private static final String MODULE_PATH =
57 Paths.get(JAVA_HOME, "jmods").toString() +
58 File.pathSeparator + MODS_DIR.toString();
59
60 // the names of the modules in this test
61 private static String[] modules = new String[] {"m1", "m2", "m3"};
62
63
64 private static boolean hasJmods() {
65 if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) {
|
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 import java.io.File;
25 import java.io.PrintWriter;
26 import java.io.StringWriter;
27 import java.nio.file.Files;
28 import java.nio.file.Path;
29 import java.nio.file.Paths;
30 import java.util.ArrayList;
31 import java.util.List;
32 import java.util.spi.ToolProvider;
33 import java.util.stream.Collectors;
34 import java.util.stream.Stream;
35 import jdk.test.lib.compiler.CompilerUtils;
36
37 import org.testng.annotations.BeforeTest;
38 import org.testng.annotations.Test;
39 import static org.testng.Assert.*;
40
41 /**
42 * @test
43 * @bug 8174826
44 * @library /lib/testlibrary /test/lib
45 * @modules jdk.charsets jdk.compiler jdk.jlink
46 * @build SuggestProviders jdk.test.lib.compiler.CompilerUtils
47 * @run testng SuggestProviders
48 */
49
50 public class SuggestProviders {
51 private static final String JAVA_HOME = System.getProperty("java.home");
52 private static final String TEST_SRC = System.getProperty("test.src");
53
54 private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
55 private static final Path MODS_DIR = Paths.get("mods");
56
57 private static final String MODULE_PATH =
58 Paths.get(JAVA_HOME, "jmods").toString() +
59 File.pathSeparator + MODS_DIR.toString();
60
61 // the names of the modules in this test
62 private static String[] modules = new String[] {"m1", "m2", "m3"};
63
64
65 private static boolean hasJmods() {
66 if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) {
|