8182404: remove jdk.testlibrary.JDKToolFinder and JDKToolLauncher
Reviewed-by: amenkov, jcbeyler, alanb
This commit is contained in:
parent
7445ebf02b
commit
2702b5c299
@ -40,7 +40,6 @@ import jdk.test.lib.apps.LingeredApp;
|
||||
import jdk.test.lib.apps.LingeredAppWithDeadlock;
|
||||
|
||||
import jdk.test.lib.Utils;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
@ -24,7 +24,6 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 6760902
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @build jdk.test.lib.process.ProcessTools
|
||||
* @run testng GetResource
|
||||
@ -45,7 +44,7 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import static jdk.test.lib.process.ProcessTools.*;
|
||||
|
||||
import org.testng.annotations.BeforeTest;
|
||||
|
@ -32,7 +32,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
|
||||
import static jdk.test.lib.process.ProcessTools.executeCommand;
|
||||
|
@ -32,8 +32,8 @@
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm JDKLoggerForImageTest
|
||||
*/
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
* 2. clients are in named/unnamed module,
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test DOES require existence of java.logging module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm JDKLoggerForJDKTest
|
||||
*/
|
||||
|
||||
|
@ -32,8 +32,8 @@
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm LoggerInImageTest
|
||||
*/
|
||||
|
||||
|
@ -34,8 +34,8 @@ import java.io.File;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm NamedLoggerForImageTest
|
||||
*/
|
||||
|
||||
|
@ -34,8 +34,8 @@ import java.io.File;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm NamedLoggerForJDKTest
|
||||
*/
|
||||
|
||||
|
@ -34,8 +34,8 @@ import java.io.File;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm UnnamedLoggerForImageTest
|
||||
*/
|
||||
|
||||
|
@ -34,8 +34,8 @@ import java.io.File;
|
||||
* patched system module, or Xbootclasspath
|
||||
* This test does not require existence of java.logging module,
|
||||
* but require jdk.compiler module
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
|
||||
* @library /test/lib
|
||||
* @build Base jdk.test.lib.compiler.CompilerUtils
|
||||
* @run main/othervm UnnamedLoggerForJDKTest
|
||||
*/
|
||||
|
||||
|
@ -45,8 +45,8 @@ import java.util.*;
|
||||
import java.util.concurrent.Phaser;
|
||||
import javax.management.*;
|
||||
import javax.management.openmbean.CompositeData;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.testlibrary.Utils;
|
||||
|
||||
import sun.hotspot.code.Compiler;
|
||||
|
@ -28,10 +28,10 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.Utils;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
|
||||
public class RunUtil {
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
* @bug 8072466
|
||||
* @summary Deadlock when initializing MulticastSocket and DatagramSocket
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @build jdk.testlibrary.*
|
||||
* @run main/othervm MultiDead
|
||||
*/
|
||||
@ -36,7 +37,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.testlibrary.Utils;
|
||||
|
||||
public class MultiDead {
|
||||
|
@ -46,7 +46,7 @@ import javax.tools.StandardJavaFileManager;
|
||||
import javax.tools.StandardLocation;
|
||||
import javax.tools.ToolProvider;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import static java.lang.String.format;
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
@ -55,10 +55,10 @@ import static java.util.Arrays.asList;
|
||||
* @bug 8064924
|
||||
* @modules jdk.compiler
|
||||
* @summary Basic test for URLStreamHandlerProvider
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @build jdk.test.lib.Platform
|
||||
* jdk.test.lib.util.FileUtils
|
||||
* jdk.testlibrary.JDKToolFinder
|
||||
* jdk.test.lib.JDKToolFinder
|
||||
* @compile Basic.java Child.java
|
||||
* @run main Basic
|
||||
*/
|
||||
|
@ -40,7 +40,7 @@ import java.util.Arrays;
|
||||
* @summary Test for feature 'support stronger entry protection'. An entry is
|
||||
* stored to keystore with different PasswordProtection objects which are
|
||||
* specified by different PBE algorithms (use -Dseed=X to set PRNG seed)
|
||||
* @library /test/lib /lib/testlibrary ../
|
||||
* @library /test/lib ../
|
||||
* @key randomness
|
||||
* @build jdk.test.lib.RandomFactory
|
||||
* @run main EntryProtectionTest
|
||||
|
@ -36,7 +36,7 @@ import java.util.List;
|
||||
* @bug 8048830
|
||||
* @summary Test for PKCS12 keystore list , export commands. Refer README for
|
||||
* keystore files information
|
||||
* @library /lib/testlibrary ../
|
||||
* @library ../
|
||||
* @library /test/lib
|
||||
* @run main KeytoolReaderP12Test
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ import static java.lang.System.out;
|
||||
* @test
|
||||
* @bug 8048830
|
||||
* @summary Tests for creating pkcs12 keystore with various algorithms
|
||||
* @library /lib/testlibrary ../
|
||||
* @library ../
|
||||
* @library /test/lib
|
||||
* @run main KeytoolWriteP12Test
|
||||
*/
|
||||
|
@ -39,7 +39,7 @@ import static java.lang.System.out;
|
||||
* @test
|
||||
* @bug 8048830
|
||||
* @summary Entry's attribute set should be empty
|
||||
* @library /lib/testlibrary ../
|
||||
* @library ../
|
||||
* @library /test/lib
|
||||
* @run main MetadataEmptyTest
|
||||
*/
|
||||
|
@ -43,7 +43,7 @@ import java.util.HashSet;
|
||||
* @test
|
||||
* @bug 8048830
|
||||
* @summary Test store metadata attributes to PKCS12 keystore.
|
||||
* @library /lib/testlibrary ../
|
||||
* @library ../
|
||||
* @library /test/lib
|
||||
* @run main MetadataStoreLoadTest
|
||||
*/
|
||||
|
@ -42,7 +42,7 @@ import static java.lang.System.out;
|
||||
* @summary Test imports certificate from file to PKCS12 keystore store it as
|
||||
* trusted certificate Check import errors (must be not errors) & check keystore
|
||||
* content after import
|
||||
* @library /lib/testlibrary ../
|
||||
* @library ../
|
||||
* @library /test/lib
|
||||
* @run main StoreTrustedCertAPITest
|
||||
*/
|
||||
|
@ -38,7 +38,7 @@ import static java.lang.System.out;
|
||||
* @bug 8048830
|
||||
* @summary Tests keytool command imports certificate , list keystore, print
|
||||
* certificate and import password help.
|
||||
* @library /lib/testlibrary ../
|
||||
* @library ../
|
||||
* @library /test/lib
|
||||
* @run main StoreTrustedCertKeytool
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import static java.lang.System.out;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -59,8 +59,8 @@ import javax.management.openmbean.SimpleType;
|
||||
import javax.management.openmbean.TabularDataSupport;
|
||||
import javax.management.openmbean.TabularType;
|
||||
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
|
||||
public class MXBeanWeirdParamTest {
|
||||
|
||||
|
@ -65,8 +65,8 @@ import javax.management.remote.JMXServiceURL;
|
||||
import javax.management.Attribute ;
|
||||
import javax.management.ObjectName ;
|
||||
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
|
||||
public class AuthorizationTest {
|
||||
|
||||
|
@ -81,8 +81,8 @@ import javax.rmi.ssl.SslRMIServerSocketFactory;
|
||||
|
||||
import java.security.Security;
|
||||
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
|
||||
public class SecurityTest {
|
||||
|
||||
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 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.
|
||||
*/
|
||||
|
||||
package jdk.testlibrary;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* @deprecated This class is deprecated. Use the one from
|
||||
* {@code <root>/test/lib/jdk/test/lib}
|
||||
*/
|
||||
@Deprecated
|
||||
public final class JDKToolFinder {
|
||||
|
||||
private JDKToolFinder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full path to an executable in jdk/bin based on System
|
||||
* property {@code test.jdk} or {@code compile.jdk} (both are set by the jtreg test suite)
|
||||
*
|
||||
* @return Full path to an executable in jdk/bin
|
||||
*/
|
||||
public static String getJDKTool(String tool) {
|
||||
|
||||
// First try to find the executable in test.jdk
|
||||
try {
|
||||
return getTool(tool, "test.jdk");
|
||||
} catch (FileNotFoundException e) {
|
||||
|
||||
}
|
||||
|
||||
// Now see if it's available in compile.jdk
|
||||
try {
|
||||
return getTool(tool, "compile.jdk");
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException("Failed to find " + tool +
|
||||
", looked in test.jdk (" + System.getProperty("test.jdk") +
|
||||
") and compile.jdk (" + System.getProperty("compile.jdk") + ")");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full path to an executable in jdk/bin based on System
|
||||
* property {@code compile.jdk}
|
||||
*
|
||||
* @return Full path to an executable in jdk/bin
|
||||
*/
|
||||
public static String getCompileJDKTool(String tool) {
|
||||
try {
|
||||
return getTool(tool, "compile.jdk");
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full path to an executable in jdk/bin based on System
|
||||
* property {@code test.jdk}
|
||||
*
|
||||
* @return Full path to an executable in jdk/bin
|
||||
*/
|
||||
public static String getTestJDKTool(String tool) {
|
||||
try {
|
||||
return getTool(tool, "test.jdk");
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getTool(String tool, String property) throws FileNotFoundException {
|
||||
String jdkPath = System.getProperty(property);
|
||||
|
||||
if (jdkPath == null) {
|
||||
throw new RuntimeException(
|
||||
"System property '" + property + "' not set. This property is normally set by jtreg. "
|
||||
+ "When running test separately, set this property using '-D" + property + "=/path/to/jdk'.");
|
||||
}
|
||||
|
||||
Path toolName = Paths.get("bin", tool + (isWindows() ? ".exe" : ""));
|
||||
|
||||
Path jdkTool = Paths.get(jdkPath, toolName.toString());
|
||||
if (!jdkTool.toFile().exists()) {
|
||||
throw new FileNotFoundException("Could not find file " + jdkTool.toAbsolutePath());
|
||||
}
|
||||
|
||||
return jdkTool.toAbsolutePath().toString();
|
||||
}
|
||||
|
||||
private static boolean isWindows() {
|
||||
return System.getProperty("os.name").toLowerCase().startsWith("win");
|
||||
}
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 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.
|
||||
*/
|
||||
|
||||
package jdk.testlibrary;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A utility for constructing command lines for starting JDK tool processes.
|
||||
*
|
||||
* The JDKToolLauncher can in particular be combined with a
|
||||
* java.lang.ProcessBuilder to easily run a JDK tool. For example, the following
|
||||
* code run {@code jmap -heap} against a process with GC logging turned on for
|
||||
* the {@code jmap} process:
|
||||
*
|
||||
* <pre>
|
||||
* {@code
|
||||
* JDKToolLauncher jmap = JDKToolLauncher.create("jmap")
|
||||
* .addVMArg("-Xlog:gc*=debug")
|
||||
* .addToolArg("-heap")
|
||||
* .addToolArg(pid);
|
||||
* ProcessBuilder pb = new ProcessBuilder(jmap.getCommand());
|
||||
* Process p = pb.start();
|
||||
* }
|
||||
* </pre>
|
||||
* @deprecated This class is deprecated. Use the one from
|
||||
* {@code <root>/test/lib/jdk/test/lib}
|
||||
*/
|
||||
@Deprecated
|
||||
public class JDKToolLauncher {
|
||||
private final String executable;
|
||||
private final List<String> vmArgs = new ArrayList<String>();
|
||||
private final List<String> toolArgs = new ArrayList<String>();
|
||||
|
||||
private JDKToolLauncher(String tool, boolean useCompilerJDK) {
|
||||
if (useCompilerJDK) {
|
||||
executable = JDKToolFinder.getJDKTool(tool);
|
||||
} else {
|
||||
executable = JDKToolFinder.getTestJDKTool(tool);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new JDKToolLauncher for the specified tool. Using tools path
|
||||
* from the compiler JDK.
|
||||
*
|
||||
* @param tool
|
||||
* The name of the tool
|
||||
* @return A new JDKToolLauncher
|
||||
*/
|
||||
public static JDKToolLauncher create(String tool) {
|
||||
return new JDKToolLauncher(tool, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new JDKToolLauncher for the specified tool in the Tested JDK.
|
||||
*
|
||||
* @param tool
|
||||
* The name of the tool
|
||||
*
|
||||
* @return A new JDKToolLauncher
|
||||
*/
|
||||
public static JDKToolLauncher createUsingTestJDK(String tool) {
|
||||
return new JDKToolLauncher(tool, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an argument to the JVM running the tool.
|
||||
*
|
||||
* The JVM arguments are passed to the underlying JVM running the tool.
|
||||
* Arguments will automatically be prepended with "-J".
|
||||
*
|
||||
* Any platform specific arguments required for running the tool are
|
||||
* automatically added.
|
||||
*
|
||||
*
|
||||
* @param arg
|
||||
* The argument to VM running the tool
|
||||
* @return The JDKToolLauncher instance
|
||||
*/
|
||||
public JDKToolLauncher addVMArg(String arg) {
|
||||
vmArgs.add(arg);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an argument to the tool.
|
||||
*
|
||||
* @param arg
|
||||
* The argument to the tool
|
||||
* @return The JDKToolLauncher instance
|
||||
*/
|
||||
public JDKToolLauncher addToolArg(String arg) {
|
||||
toolArgs.add(arg);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the command that can be used for running the tool.
|
||||
*
|
||||
* @return An array whose elements are the arguments of the command.
|
||||
*/
|
||||
public String[] getCommand() {
|
||||
List<String> command = new ArrayList<String>();
|
||||
command.add(executable);
|
||||
// Add -J in front of all vmArgs
|
||||
for (String arg : vmArgs) {
|
||||
command.add("-J" + arg);
|
||||
}
|
||||
command.addAll(toolArgs);
|
||||
return command.toArray(new String[command.size()]);
|
||||
}
|
||||
}
|
@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
||||
import jdk.internal.agent.Agent;
|
||||
import jdk.internal.agent.AgentConfigurationError;
|
||||
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.util.JarUtils;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
@ -25,7 +25,7 @@ import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
|
||||
/**
|
||||
* Helper class for starting jcmd process.
|
||||
|
@ -44,7 +44,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.apps.LingeredApp;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.testlibrary.Utils;
|
||||
|
||||
public class BasicLauncherTest {
|
||||
|
@ -39,12 +39,12 @@ import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.apps.LingeredApp;
|
||||
import jdk.test.lib.Platform;
|
||||
import jdk.test.lib.hprof.parser.HprofReader;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
|
||||
public class HeapDumpTest {
|
||||
|
||||
|
@ -33,7 +33,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import jdk.test.lib.apps.LingeredApp;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.testlibrary.Utils;
|
||||
|
||||
public class TmtoolTestScenario {
|
||||
|
@ -23,16 +23,14 @@
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @summary Unit test for jinfo utility
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @build jdk.testlibrary.*
|
||||
* @run main BasicJInfoTest
|
||||
*/
|
||||
public class BasicJInfoTest {
|
||||
|
@ -27,10 +27,10 @@ import static jdk.testlibrary.Asserts.fail;
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.hprof.HprofParser;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
|
||||
/*
|
||||
* @test
|
||||
|
@ -35,10 +35,10 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.Asserts;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.testlibrary.Utils;
|
||||
|
||||
/**
|
||||
|
@ -25,14 +25,12 @@ import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @summary Unit test for jstack utility
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @build jdk.testlibrary.*
|
||||
* @run main BasicJStackTest
|
||||
*/
|
||||
public class BasicJStackTest {
|
||||
|
@ -32,7 +32,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
import jdk.testlibrary.Utils;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
|
||||
/**
|
||||
* @test
|
||||
|
@ -24,18 +24,17 @@
|
||||
/**
|
||||
* @test
|
||||
* @bug 8035668
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @summary Test checks case when target application finishes execution and jstat didn't complete work.
|
||||
jstat is started with interval = 100 (jstat -compiler 100) and monitored application finishes
|
||||
after 500ms. This shouldn't cause crash or hang in target application or in jstat.
|
||||
* @modules java.management
|
||||
* @build jdk.testlibrary.* JStatInterval
|
||||
* @build JStatInterval
|
||||
* @run main JStatInterval
|
||||
*/
|
||||
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#
|
||||
|
||||
# @test
|
||||
# @bug 6959965
|
||||
# @bug 6959965
|
||||
# @run shell jstatClassloadOutput1.sh
|
||||
# @summary Test that output of 'jstat -classload 0' has expected line counts
|
||||
|
||||
|
@ -30,8 +30,8 @@ import java.util.Arrays;
|
||||
|
||||
import jdk.test.lib.thread.ProcessThread;
|
||||
import static jdk.testlibrary.Asserts.*;
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.testlibrary.Utils;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
|
@ -21,17 +21,15 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import jdk.testlibrary.JDKToolLauncher;
|
||||
import jdk.test.lib.JDKToolLauncher;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4990825
|
||||
* @library /lib/testlibrary
|
||||
* @library /test/lib
|
||||
* @modules java.management
|
||||
* @build jdk.testlibrary.*
|
||||
* @run main TestJstatdUsage
|
||||
*/
|
||||
public class TestJstatdUsage {
|
||||
|
@ -36,7 +36,7 @@ import java.util.jar.JarOutputStream;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@ -52,7 +52,7 @@ import static org.testng.Assert.assertTrue;
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @build jdk.test.lib.Platform
|
||||
* jdk.test.lib.util.FileUtils
|
||||
* jdk.testlibrary.JDKToolFinder
|
||||
* jdk.test.lib.JDKToolFinder
|
||||
* @run testng CLICompatibility
|
||||
* @summary Basic test for compatibility of CLI options
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Test;
|
||||
@ -47,12 +47,12 @@ import static java.lang.System.out;
|
||||
/*
|
||||
* @test
|
||||
* @bug 8167328 8171830 8165640 8174248 8176772 8196748 8191533
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* jdk.jartool
|
||||
* @build jdk.test.lib.Platform
|
||||
* jdk.test.lib.util.FileUtils
|
||||
* jdk.testlibrary.JDKToolFinder
|
||||
* jdk.test.lib.JDKToolFinder
|
||||
* @compile Basic.java
|
||||
* @run testng Basic
|
||||
* @summary Tests for plain Modular jars & Multi-Release Modular jars
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 8157068 8177844
|
||||
* @summary Patch java.base and user module with ModuleHashes attribute
|
||||
* @library /lib/testlibrary /test/lib
|
||||
* @library /test/lib
|
||||
* @modules jdk.compiler
|
||||
* @build jdk.test.lib.compiler.CompilerUtils
|
||||
* jdk.test.lib.util.FileUtils
|
||||
@ -43,7 +43,7 @@ import java.util.stream.Stream;
|
||||
|
||||
import jdk.test.lib.compiler.CompilerUtils;
|
||||
import jdk.test.lib.util.FileUtils;
|
||||
import jdk.testlibrary.JDKToolFinder;
|
||||
import jdk.test.lib.JDKToolFinder;
|
||||
import org.testng.annotations.BeforeTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user