< prev index next >

test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.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


  25 import java.nio.file.Files;
  26 import java.nio.file.Path;
  27 import java.nio.file.Paths;
  28 import java.util.Arrays;
  29 import java.util.stream.Collectors;
  30 import java.util.stream.Stream;
  31 
  32 import jdk.test.lib.compiler.CompilerUtils;
  33 import jdk.test.lib.util.FileUtils;
  34 import static jdk.testlibrary.ProcessTools.*;
  35 
  36 
  37 import org.testng.annotations.BeforeTest;
  38 import org.testng.annotations.Test;
  39 import static org.testng.Assert.*;
  40 
  41 /**
  42  * @test
  43  * @library /lib/testlibrary /test/lib
  44  * @modules jdk.compiler jdk.jlink
  45  * @build CompiledVersionTest jdk.testlibrary.ProcessTools
  46  *        jdk.test.lib.compiler.CompilerUtils


  47  * @run testng CompiledVersionTest
  48  */
  49 
  50 public class CompiledVersionTest {
  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     private static final Path IMAGE = Paths.get("image");
  57     private static final Path JMODS = Paths.get(JAVA_HOME, "jmods");
  58     private static final String MAIN_MID = "test/jdk.test.Main";
  59 
  60     // the names of the modules in this test
  61     private static String[] modules  = new String[] { "m1", "m2", "test"};
  62     private static String[] versions = new String[] { "1.0", "2-ea", "3-internal"};
  63 
  64 
  65     private static boolean hasJmods() {
  66         if (!Files.exists(JMODS)) {




  25 import java.nio.file.Files;
  26 import java.nio.file.Path;
  27 import java.nio.file.Paths;
  28 import java.util.Arrays;
  29 import java.util.stream.Collectors;
  30 import java.util.stream.Stream;
  31 
  32 import jdk.test.lib.compiler.CompilerUtils;
  33 import jdk.test.lib.util.FileUtils;
  34 import static jdk.testlibrary.ProcessTools.*;
  35 
  36 
  37 import org.testng.annotations.BeforeTest;
  38 import org.testng.annotations.Test;
  39 import static org.testng.Assert.*;
  40 
  41 /**
  42  * @test
  43  * @library /lib/testlibrary /test/lib
  44  * @modules jdk.compiler jdk.jlink
  45  * @build jdk.test.lib.compiler.CompilerUtils
  46  *        jdk.test.lib.util.FileUtils
  47  *        jdk.test.lib.Platform
  48  *        CompiledVersionTest jdk.testlibrary.ProcessTools
  49  * @run testng CompiledVersionTest
  50  */
  51 
  52 public class CompiledVersionTest {
  53     private static final String JAVA_HOME = System.getProperty("java.home");
  54     private static final String TEST_SRC = System.getProperty("test.src");
  55 
  56     private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
  57     private static final Path MODS_DIR = Paths.get("mods");
  58     private static final Path IMAGE = Paths.get("image");
  59     private static final Path JMODS = Paths.get(JAVA_HOME, "jmods");
  60     private static final String MAIN_MID = "test/jdk.test.Main";
  61 
  62     // the names of the modules in this test
  63     private static String[] modules  = new String[] { "m1", "m2", "test"};
  64     private static String[] versions = new String[] { "1.0", "2-ea", "3-internal"};
  65 
  66 
  67     private static boolean hasJmods() {
  68         if (!Files.exists(JMODS)) {


< prev index next >