mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-17 13:55:20 +00:00
8181335: remove packageless CompilerUtils
Reviewed-by: alanb
This commit is contained in:
parent
245dc365f7
commit
ff3aa035f3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,6 +32,7 @@
|
||||
*/
|
||||
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@ -30,6 +30,7 @@ import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeClass;
|
||||
@ -42,7 +43,8 @@ import static org.testng.Assert.assertTrue;
|
||||
* @summary Tests for Class.forName(Module,String)
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build TestDriver CompilerUtils jdk.testlibrary.ProcessTools TestMain TestLayer
|
||||
* @build jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* TestDriver TestMain TestLayer
|
||||
* @run testng TestDriver
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,6 +25,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
@ -32,9 +33,9 @@ import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build ResourcesTest CompilerUtils jdk.testlibrary.*
|
||||
* @build ResourcesTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng ResourcesTest
|
||||
* @summary Driver for basic test of Class getResource and getResourceAsStream
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,6 +25,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
@ -33,9 +34,9 @@ import static org.testng.Assert.*;
|
||||
/**
|
||||
* @test
|
||||
* @bug 8087335
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build ResourcesTest CompilerUtils jdk.testlibrary.*
|
||||
* @build ResourcesTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng ResourcesTest
|
||||
* @summary Driver for basic test of ClassLoader getResource and getResourceAsStream
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build LayerAndLoadersTest CompilerUtils ModuleUtils
|
||||
* @build LayerAndLoadersTest jdk.test.lib.compiler.CompilerUtils ModuleUtils
|
||||
* @run testng LayerAndLoadersTest
|
||||
* @summary Tests for java.lang.ModuleLayer@defineModulesWithXXX methods
|
||||
*/
|
||||
@ -48,6 +48,7 @@ import java.util.Optional;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@ import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -34,9 +35,9 @@ import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build AccessTest CompilerUtils jdk.testlibrary.*
|
||||
* @build AccessTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng AccessTest
|
||||
* @summary Driver for test that checks access to access to types in
|
||||
* exported and non-exported packages.
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 6479237
|
||||
* @summary Basic test StackTraceElement with class loader names
|
||||
* @library lib /lib/testlibrary
|
||||
* @library lib /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build m1/* WithClassLoaderName
|
||||
* @run main/othervm m1/com.app.Main
|
||||
@ -39,6 +39,8 @@ import java.net.URLClassLoader;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import com.app.Utils;
|
||||
|
||||
public class WithClassLoaderName {
|
||||
|
||||
@ -33,6 +33,7 @@ import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm JDKLoggerForImageTest
|
||||
*/
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* 2. clients are in named/unnamed module,
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test DOES require existence of java.logging module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm JDKLoggerForJDKTest
|
||||
*/
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm LoggerInImageTest
|
||||
*/
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm NamedLoggerForImageTest
|
||||
*/
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm NamedLoggerForJDKTest
|
||||
*/
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm UnnamedLoggerForImageTest
|
||||
*/
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ import static jdk.testlibrary.ProcessTools.executeCommand;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary
|
||||
* @build Base CompilerUtils jdk.testlibrary.*
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run main/othervm UnnamedLoggerForJDKTest
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,10 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules java.base/jdk.internal.module
|
||||
* jdk.compiler
|
||||
* @build ModuleReaderTest CompilerUtils JarUtils
|
||||
* @build ModuleReaderTest jdk.test.lib.compiler.CompilerUtils JarUtils
|
||||
* @run testng ModuleReaderTest
|
||||
* @summary Basic tests for java.lang.module.ModuleReader
|
||||
*/
|
||||
@ -53,6 +53,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.spi.ToolProvider;
|
||||
|
||||
import jdk.internal.module.ModulePath;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,6 +29,7 @@ import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -37,9 +38,10 @@ import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build ProxyClassAccessTest q.NP CompilerUtils jdk.testlibrary.*
|
||||
* @build ProxyClassAccessTest q.NP jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng ProxyClassAccessTest
|
||||
* @summary Driver for testing proxy class doesn't have access to
|
||||
* types referenced by proxy interfaces
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,6 +29,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -37,9 +38,10 @@ import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build ProxyTest CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* @build ProxyTest jdk.testlibrary.ProcessTools
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng ProxyLayerTest
|
||||
* @summary Test proxies to implement interfaces in a layer
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@ import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -34,9 +35,10 @@ import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build ProxyTest q.U CompilerUtils jdk.testlibrary.*
|
||||
* @build ProxyTest q.U jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng ProxyTest
|
||||
* @summary Driver for testing proxies accessing interfaces in named modules
|
||||
*/
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
* @library ../../../../com/sun/net/httpserver
|
||||
* /lib/testlibrary
|
||||
* /test/lib
|
||||
* @build FileServerHandler JarUtils CompilerUtils
|
||||
* @build FileServerHandler JarUtils jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm CloseTest
|
||||
* @summary URL-downloaded jar files can consume all available file descriptors
|
||||
*/
|
||||
@ -45,6 +45,8 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import com.sun.net.httpserver.HttpContext;
|
||||
import com.sun.net.httpserver.HttpServer;
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* @bug 6899919
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build JarUtils CompilerUtils
|
||||
* @build JarUtils jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm GetResourceAsStream
|
||||
*/
|
||||
|
||||
@ -40,6 +40,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
public class GetResourceAsStream extends Common {
|
||||
private static final String WORK_DIR = System.getProperty("user.dir");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,8 +25,8 @@
|
||||
* @test
|
||||
* @bug 8153665
|
||||
* @summary Test two URLClassLoader define Package object of the same name
|
||||
* @library /lib/testlibrary
|
||||
* @build CompilerUtils
|
||||
* @library /test/lib
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @modules jdk.compiler
|
||||
* @run testng SplitPackage
|
||||
*/
|
||||
@ -38,6 +38,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.jar.Manifest;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build jdk.testlibrary.ProcessTools
|
||||
* ModuleTest CompilerUtils JarUtils
|
||||
* ModuleTest jdk.test.lib.compiler.CompilerUtils JarUtils
|
||||
* @run testng ModuleTest
|
||||
* @summary Basic tests for using rmi in module world
|
||||
*/
|
||||
@ -36,6 +36,7 @@ import static org.testng.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,6 +33,7 @@ import java.io.IOException;
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
/**
|
||||
@ -40,8 +41,9 @@ import org.testng.annotations.BeforeTest;
|
||||
* @bug 8130360
|
||||
* @library /lib/testlibrary
|
||||
* @library /java/security/modules
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.module
|
||||
* @build CompilerUtils JarUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils JarUtils
|
||||
* @summary Test custom security provider module with all possible modular
|
||||
* condition. The test includes different combination of security
|
||||
* client/provider modules interaction with or without service
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,9 +24,9 @@
|
||||
/**
|
||||
* @test
|
||||
* @bug 8170772
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build CacheTest CompilerUtils jdk.testlibrary.*
|
||||
* @build CacheTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng CacheTest
|
||||
*/
|
||||
|
||||
@ -37,12 +37,12 @@ import java.nio.file.Paths;
|
||||
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
|
||||
@Test
|
||||
public class CacheTest {
|
||||
|
||||
|
||||
@ -24,9 +24,10 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 8177980
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build CompilerUtils jdk.testlibrary.ProcessTools CaseInsensitiveNameClash
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* jdk.testlibrary.ProcessTools CaseInsensitiveNameClash
|
||||
* @run testng CaseInsensitiveNameClash
|
||||
*/
|
||||
|
||||
@ -34,6 +35,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@ import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -34,9 +35,9 @@ import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build TestPermission CompilerUtils jdk.testlibrary.*
|
||||
* @build TestPermission jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng TestPermission
|
||||
* @summary Driver for testing ResourceBundle::getBundle(String, Module)
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng/othervm BadProvidersTest
|
||||
* @summary Basic test of ServiceLoader with bad provider and bad provider
|
||||
* factories deployed on the module path
|
||||
@ -44,6 +44,8 @@ import java.util.ServiceLoader.Provider;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -30,15 +30,17 @@ import org.testng.annotations.Test;
|
||||
|
||||
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8129126 8136802 8137316 8137317 8136804 8139350
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* java.logging
|
||||
* @build GetResourceBundleTest CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* @build GetResourceBundleTest jdk.testlibrary.ProcessTools
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng GetResourceBundleTest
|
||||
* @summary Tests Logger.getLogger + logger.getResourceBundle in an named/unnamed module,
|
||||
* resources are in named and unnamed modules respectively.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,14 +32,15 @@ import java.lang.module.ModuleDescriptor;
|
||||
import java.util.ArrayList;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8078813
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /java/security/modules
|
||||
* @build CompilerUtils JarUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils JarUtils
|
||||
* @summary Test custom JAAS module with all possible modular option. The test
|
||||
* includes different combination of JAAS client/login modules
|
||||
* interaction with or without service description.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -30,6 +30,7 @@ import java.util.Arrays;
|
||||
import java.io.IOException;
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.util.ArrayList;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -37,9 +38,9 @@ import org.testng.annotations.BeforeTest;
|
||||
/**
|
||||
* @test
|
||||
* @bug 8151654
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /java/security/modules
|
||||
* @build CompilerUtils JarUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils JarUtils
|
||||
* @summary Test custom JAAS callback handler with all possible modular option.
|
||||
* @run testng JaasModularDefaultHandlerTest
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,14 +25,13 @@
|
||||
* @test
|
||||
* @bug 8170859
|
||||
* @summary Ensure no incubator modules are resolved by default in the image
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng DefaultImage
|
||||
*/
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.lang.module.ModuleFinder;
|
||||
@ -42,6 +41,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Stream;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @key intermittent
|
||||
* @modules jdk.compiler jdk.jartool jdk.jlink
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng/othervm ImageModules
|
||||
*/
|
||||
|
||||
@ -45,6 +45,7 @@ import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.DataProvider;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build RunWithAutomaticModules CompilerUtils JarUtils
|
||||
* @build RunWithAutomaticModules jdk.test.lib.compiler.CompilerUtils JarUtils
|
||||
* jdk.testlibrary.ProcessTools
|
||||
* @run testng RunWithAutomaticModules
|
||||
* @summary Runs tests that make use of automatic modules
|
||||
@ -35,6 +35,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,12 +23,12 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.jartool/sun.tools.jar
|
||||
* jdk.compiler
|
||||
* jdk.zipfs
|
||||
* java.se
|
||||
* @build ContainerTest CompilerUtils jdk.testlibrary.*
|
||||
* @build ContainerTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng ContainerTest
|
||||
* @summary Starts a simple container that uses dynamic configurations
|
||||
* and launches two applications in the same VM
|
||||
@ -38,6 +38,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build OverlappingPackagesTest CompilerUtils jdk.testlibrary.*
|
||||
* @build OverlappingPackagesTest jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng OverlappingPackagesTest
|
||||
* @summary Basic test to ensure that startup fails if two or more modules
|
||||
* in the boot Layer have the same package
|
||||
@ -36,6 +37,7 @@ import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import javax.tools.JavaCompiler;
|
||||
import javax.tools.StandardJavaFileManager;
|
||||
import javax.tools.StandardLocation;
|
||||
import javax.tools.ToolProvider;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* This class consists exclusively of static utility methods for invoking the
|
||||
* java compiler.
|
||||
*/
|
||||
|
||||
public final class CompilerUtils {
|
||||
private CompilerUtils() { }
|
||||
|
||||
/**
|
||||
* Compile all the java sources in {@code <source>/**} to
|
||||
* {@code <destination>/**}. The destination directory will be created if
|
||||
* it doesn't exist.
|
||||
*
|
||||
* All warnings/errors emitted by the compiler are output to System.out/err.
|
||||
*
|
||||
* @return true if the compilation is successful
|
||||
*
|
||||
* @throws IOException
|
||||
* if there is an I/O error scanning the source tree or
|
||||
* creating the destination directory
|
||||
* @throws UnsupportedOperationException
|
||||
* if there is no system java compiler
|
||||
*/
|
||||
public static boolean compile(Path source, Path destination, String ... options)
|
||||
throws IOException
|
||||
{
|
||||
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
|
||||
if (compiler == null) {
|
||||
// no compiler available
|
||||
throw new UnsupportedOperationException("Unable to get system java compiler. " +
|
||||
"Perhaps, jdk.compiler module is not available.");
|
||||
}
|
||||
StandardJavaFileManager jfm = compiler.getStandardFileManager(null, null, null);
|
||||
|
||||
List<Path> sources
|
||||
= Files.find(source, Integer.MAX_VALUE,
|
||||
(file, attrs) -> (file.toString().endsWith(".java")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Files.createDirectories(destination);
|
||||
jfm.setLocation(StandardLocation.CLASS_PATH, Collections.EMPTY_LIST);
|
||||
jfm.setLocationFromPaths(StandardLocation.CLASS_OUTPUT,
|
||||
Arrays.asList(destination));
|
||||
|
||||
List<String> opts = Arrays.asList(options);
|
||||
JavaCompiler.CompilationTask task
|
||||
= compiler.getTask(null, jfm, null, opts, null,
|
||||
jfm.getJavaFileObjectsFromPaths(sources));
|
||||
|
||||
return task.call();
|
||||
}
|
||||
}
|
||||
@ -27,7 +27,8 @@
|
||||
* @library /test/lib
|
||||
* /lib/testlibrary
|
||||
* @modules jdk.compiler
|
||||
* @build src.test.src.TestDriver CompilerUtils JarUtils
|
||||
* @build src.test.src.TestDriver JarUtils
|
||||
* jdk.test.lib.CompilerUtils
|
||||
* jdk.test.lib.JDKToolFinder
|
||||
* jdk.test.lib.process.*
|
||||
* @summary various resource and classloading bugs related to jar files
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 4906940 8130302
|
||||
* @summary -providerPath, -providerClass, -addprovider, and -providerArg
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules java.base/jdk.internal.misc
|
||||
*/
|
||||
|
||||
@ -33,6 +33,7 @@ import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.util.JarUtils;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import java.nio.file.*;
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
* @bug 8047305 8075618
|
||||
* @summary Tests jarsigner tool and JarSigner API work with multi-release JAR files.
|
||||
* @library /test/lib
|
||||
* @library /lib/testlibrary
|
||||
* @run main MVJarSigningTest
|
||||
*/
|
||||
|
||||
@ -59,6 +58,7 @@ import java.util.zip.ZipOutputStream;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.Utils;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,11 +24,11 @@
|
||||
/*
|
||||
* @test
|
||||
* @summary jlink test of --add-module ALL-MODULE-PATH
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build jdk.testlibrary.ProcessTools
|
||||
* jdk.testlibrary.OutputAnalyzer
|
||||
* CompilerUtils
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng AllModulePath
|
||||
*/
|
||||
|
||||
@ -48,6 +48,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.spi.ToolProvider;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,13 +25,13 @@
|
||||
* @test
|
||||
* @summary Basic test of jlink to create jmods and images
|
||||
* @author Andrei Eremeev
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules java.base/jdk.internal.module
|
||||
* jdk.jlink
|
||||
* jdk.compiler
|
||||
* @build jdk.testlibrary.ProcessTools
|
||||
* jdk.testlibrary.OutputAnalyzer
|
||||
* JarUtils CompilerUtils
|
||||
* JarUtils jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main BasicTest
|
||||
*/
|
||||
|
||||
@ -45,6 +45,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.spi.ToolProvider;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -42,9 +43,10 @@ import static org.testng.Assert.*;
|
||||
/**
|
||||
* @test
|
||||
* @bug 8174826
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler jdk.jlink
|
||||
* @build BindServices CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* @build BindServices jdk.testlibrary.ProcessTools
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng BindServices
|
||||
*/
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@ import java.util.List;
|
||||
import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
@ -40,9 +41,9 @@ import static org.testng.Assert.*;
|
||||
/**
|
||||
* @test
|
||||
* @bug 8174826
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.charsets jdk.compiler jdk.jlink
|
||||
* @build SuggestProviders CompilerUtils
|
||||
* @build SuggestProviders jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng SuggestProviders
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,10 +24,10 @@
|
||||
/*
|
||||
* @test
|
||||
* @summary Test --no-man-pages and --no-header-files
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jlink
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng ExcludeJmodSectionPluginTest
|
||||
*/
|
||||
|
||||
@ -48,6 +48,7 @@ import java.util.Set;
|
||||
import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.DataProvider;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,10 +25,10 @@
|
||||
* @test
|
||||
* @bug 8169925
|
||||
* @summary Validate the license files deduplicated in the image
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jlink
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng LegalFilePluginTest
|
||||
*/
|
||||
|
||||
@ -53,6 +53,7 @@ import java.util.Set;
|
||||
import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.DataProvider;
|
||||
|
||||
@ -29,6 +29,7 @@ import java.util.Arrays;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
@ -41,7 +42,8 @@ import static org.testng.Assert.*;
|
||||
* @test
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler jdk.jlink
|
||||
* @build CompiledVersionTest CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* @build CompiledVersionTest jdk.testlibrary.ProcessTools
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng CompiledVersionTest
|
||||
*/
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@ import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
@ -47,7 +48,8 @@ import static org.testng.Assert.*;
|
||||
* @modules jdk.compiler jdk.jlink
|
||||
* @modules java.base/jdk.internal.module
|
||||
* @modules java.base/jdk.internal.org.objectweb.asm
|
||||
* @build ModuleTargetHelper UserModuleTest CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* @build ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng UserModuleTest
|
||||
*/
|
||||
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jlink
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng JmodNegativeTest
|
||||
* @summary Negative tests for jmod
|
||||
*/
|
||||
@ -42,6 +42,7 @@ import java.util.function.Supplier;
|
||||
import java.util.spi.ToolProvider;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -25,10 +25,10 @@
|
||||
* @test
|
||||
* @bug 8142968 8166568 8166286 8170618 8168149
|
||||
* @summary Basic test for jmod
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jlink
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng/othervm -Djava.io.tmpdir=. JmodTest
|
||||
*/
|
||||
|
||||
@ -41,6 +41,7 @@ import java.util.function.Consumer;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.spi.ToolProvider;
|
||||
import java.util.stream.Stream;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build AddExportsTest CompilerUtils jdk.testlibrary.*
|
||||
* @build AddExportsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng AddExportsTest
|
||||
* @summary Basic tests for java --add-exports
|
||||
*/
|
||||
@ -34,6 +34,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.jlink/jdk.tools.jmod
|
||||
* jdk.compiler
|
||||
* @build AddModsTest CompilerUtils jdk.testlibrary.*
|
||||
* @build AddModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng AddModsTest
|
||||
* @summary Basic test for java --add-modules
|
||||
*/
|
||||
@ -35,6 +35,7 @@ import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build AddReadsTest CompilerUtils JarUtils jdk.testlibrary.*
|
||||
* @build AddReadsTest JarUtils jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng AddReadsTest
|
||||
* @summary Basic tests for java --add-reads
|
||||
*/
|
||||
@ -33,6 +34,7 @@
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,11 +23,11 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jartool
|
||||
* jdk.jlink
|
||||
* @build BasicTest CompilerUtils jdk.testlibrary.*
|
||||
* @build BasicTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng BasicTest
|
||||
* @summary Basic test of starting an application as a module
|
||||
*/
|
||||
@ -38,6 +38,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.spi.ToolProvider;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -30,6 +30,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.spi.ToolProvider;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.DataProvider;
|
||||
@ -42,10 +43,10 @@ import static jdk.testlibrary.ProcessTools.*;
|
||||
* @test
|
||||
* @bug 8168205
|
||||
* @summary Test the default class path if -Djava.class.path is set
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jartool
|
||||
* @build CompilerUtils jdk.testlibrary.*
|
||||
* @build jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng JavaClassPathTest
|
||||
*/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,10 +24,11 @@
|
||||
/**
|
||||
* @test
|
||||
* @bug 8159596
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jartool
|
||||
* @build DryRunTest CompilerUtils jdk.testlibrary.ProcessTools
|
||||
* @build DryRunTest jdk.testlibrary.ProcessTools
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng DryRunTest
|
||||
* @summary Test java --dry-run
|
||||
*/
|
||||
@ -39,13 +40,13 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.spi.ToolProvider;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
|
||||
@Test
|
||||
public class DryRunTest {
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules java.desktop java.logging jdk.compiler
|
||||
* @build LimitModsTest CompilerUtils jdk.testlibrary.*
|
||||
* @build LimitModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng LimitModsTest
|
||||
* @summary Basic tests for java --limit-modules
|
||||
*/
|
||||
@ -33,13 +33,13 @@
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
|
||||
@Test
|
||||
public class LimitModsTest {
|
||||
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules java.se
|
||||
* @build ListModsTest CompilerUtils jdk.testlibrary.*
|
||||
* @build ListModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @run testng ListModsTest
|
||||
* @summary Basic test for java --list-modules
|
||||
*/
|
||||
@ -33,6 +33,7 @@
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.testlibrary.ProcessTools;
|
||||
import jdk.testlibrary.OutputAnalyzer;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build PatchTest CompilerUtils JarUtils jdk.testlibrary.*
|
||||
* @build PatchTest JarUtils jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng PatchTest
|
||||
* @summary Basic test for --patch-module
|
||||
*/
|
||||
@ -37,13 +38,13 @@ import java.nio.file.Paths;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
|
||||
/**
|
||||
* Compiles and launches a test that uses --patch-module with two directories
|
||||
* of classes to override existing classes and add new classes to modules in
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,9 +25,10 @@
|
||||
* @test
|
||||
* @bug 8168836
|
||||
* @summary Basic argument validation for --patch-module
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build PatchTestWarningError CompilerUtils JarUtils jdk.testlibrary.*
|
||||
* @build PatchTestWarningError JarUtils jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng PatchTestWarningError
|
||||
*/
|
||||
|
||||
@ -38,6 +39,7 @@ import java.nio.file.Paths;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
* @summary Patch java.base and user module with ModuleHashes attribute
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build CompilerUtils
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng PatchSystemModules
|
||||
*/
|
||||
|
||||
@ -39,6 +39,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @library /lib/testlibrary
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build UpgradeModulePathTest CompilerUtils jdk.testlibrary.*
|
||||
* @build UpgradeModulePathTest jdk.testlibrary.*
|
||||
* jdk.test.lib.compiler.CompilerUtils
|
||||
* @run testng UpgradeModulePathTest
|
||||
* @summary Basic test for java --upgrade-module-path
|
||||
*/
|
||||
@ -34,6 +35,7 @@ import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import static jdk.testlibrary.ProcessTools.executeTestJava;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
@ -46,7 +48,6 @@ import static org.testng.Assert.*;
|
||||
* modue path.
|
||||
*/
|
||||
|
||||
|
||||
@Test
|
||||
public class UpgradeModulePathTest {
|
||||
|
||||
|
||||
@ -25,18 +25,18 @@
|
||||
* @test
|
||||
* @summary Test Multi-Release jar support in schemagen tool
|
||||
* @library /test/lib
|
||||
* @library /lib/testlibrary
|
||||
* @modules jdk.compiler java.xml.ws
|
||||
* @build jdk.test.lib.JDKToolFinder jdk.test.lib.JDKToolLauncher
|
||||
* jdk.test.lib.process.OutputAnalyzer
|
||||
* jdk.test.lib.process.ProcessTools
|
||||
* jdk.test.lib.Utils
|
||||
* CompilerUtils MultiReleaseJarTest
|
||||
* jdk.test.lib.compiler.CompilerUtils MultiReleaseJarTest
|
||||
* @run testng MultiReleaseJarTest
|
||||
*/
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.Utils;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
@ -114,4 +114,5 @@ public class MultiReleaseJarTest {
|
||||
"--add-modules", "java.xml.ws"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,18 +25,18 @@
|
||||
* @test
|
||||
* @summary Test Multi-Release jar support in wsgen tool
|
||||
* @library /test/lib
|
||||
* @library /lib/testlibrary
|
||||
* @modules jdk.compiler java.xml.ws
|
||||
* @build jdk.test.lib.JDKToolFinder jdk.test.lib.JDKToolLauncher
|
||||
* jdk.test.lib.process.OutputAnalyzer
|
||||
* jdk.test.lib.process.ProcessTools
|
||||
* jdk.test.lib.Utils
|
||||
* CompilerUtils MultiReleaseJarTest
|
||||
* jdk.test.lib.compiler.CompilerUtils MultiReleaseJarTest
|
||||
* @run testng MultiReleaseJarTest
|
||||
*/
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.Utils;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
@ -117,4 +117,5 @@ public class MultiReleaseJarTest {
|
||||
"--add-modules", "java.xml.ws"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user