< prev index next >

test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java

Print this page
rev 17324 : 8181761: add explicit @build actions for jdk.test.lib classes in all :tier2 tests
Reviewed-by: duke
rev 17325 : imported patch 8181761-1


  31 import java.util.spi.ToolProvider;
  32 import java.util.stream.Collectors;
  33 import java.util.stream.Stream;
  34 
  35 import jdk.test.lib.compiler.CompilerUtils;
  36 import jdk.test.lib.util.FileUtils;
  37 
  38 import static jdk.testlibrary.ProcessTools.*;
  39 
  40 import org.testng.annotations.BeforeTest;
  41 import org.testng.annotations.Test;
  42 import static org.testng.Assert.*;
  43 
  44 /**
  45  * @test
  46  * @bug 8142968 8173381 8174740
  47  * @library /lib/testlibrary /test/lib
  48  * @modules jdk.compiler jdk.jlink
  49  * @modules java.base/jdk.internal.module
  50  * @modules java.base/jdk.internal.org.objectweb.asm
  51  * @build ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
  52  *        jdk.test.lib.compiler.CompilerUtils


  53  * @run testng UserModuleTest
  54  */
  55 
  56 public class UserModuleTest {
  57     private static final String JAVA_HOME = System.getProperty("java.home");
  58     private static final String TEST_SRC = System.getProperty("test.src");
  59 
  60     private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
  61     private static final Path MODS_DIR = Paths.get("mods");
  62     private static final Path JMODS_DIR = Paths.get("jmods");
  63 
  64     private static final Path IMAGE = Paths.get("image");
  65     private static final String MAIN_MID = "m1/p1.Main";
  66 
  67     // the names of the modules in this test
  68     private static String[] modules = new String[] {"m1", "m2", "m3", "m4", "m5"};
  69 
  70 
  71     private static boolean hasJmods() {
  72         if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) {




  31 import java.util.spi.ToolProvider;
  32 import java.util.stream.Collectors;
  33 import java.util.stream.Stream;
  34 
  35 import jdk.test.lib.compiler.CompilerUtils;
  36 import jdk.test.lib.util.FileUtils;
  37 
  38 import static jdk.testlibrary.ProcessTools.*;
  39 
  40 import org.testng.annotations.BeforeTest;
  41 import org.testng.annotations.Test;
  42 import static org.testng.Assert.*;
  43 
  44 /**
  45  * @test
  46  * @bug 8142968 8173381 8174740
  47  * @library /lib/testlibrary /test/lib
  48  * @modules jdk.compiler jdk.jlink
  49  * @modules java.base/jdk.internal.module
  50  * @modules java.base/jdk.internal.org.objectweb.asm
  51  * @build jdk.test.lib.compiler.CompilerUtils
  52  *        jdk.test.lib.util.FileUtils
  53  *        jdk.test.lib.Platform
  54  *        ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
  55  * @run testng UserModuleTest
  56  */
  57 
  58 public class UserModuleTest {
  59     private static final String JAVA_HOME = System.getProperty("java.home");
  60     private static final String TEST_SRC = System.getProperty("test.src");
  61 
  62     private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
  63     private static final Path MODS_DIR = Paths.get("mods");
  64     private static final Path JMODS_DIR = Paths.get("jmods");
  65 
  66     private static final Path IMAGE = Paths.get("image");
  67     private static final String MAIN_MID = "m1/p1.Main";
  68 
  69     // the names of the modules in this test
  70     private static String[] modules = new String[] {"m1", "m2", "m3", "m4", "m5"};
  71 
  72 
  73     private static boolean hasJmods() {
  74         if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) {


< prev index next >