< prev index next >

test/compiler/tiered/TransitionsTestExecutor.java

Print this page

        

*** 19,37 **** * 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 jdk.test.lib.OutputAnalyzer; import jdk.test.lib.ProcessTools; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.ArrayList; import java.util.Collections; import java.util.List; - import compiler.whitebox.CompilerWhiteBoxTest; /** * Executes given test in a separate VM with enabled Tiered Compilation for * CompilationPolicyChoice 2 and 3 */ --- 19,39 ---- * 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 compiler.tiered; + + import compiler.whitebox.CompilerWhiteBoxTest; import jdk.test.lib.OutputAnalyzer; import jdk.test.lib.ProcessTools; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Executes given test in a separate VM with enabled Tiered Compilation for * CompilationPolicyChoice 2 and 3 */
*** 57,67 **** // Construct execution command with compilation policy choice and test name List<String> args = new ArrayList<>(vmArgs); Collections.addAll(args, policy, testName); OutputAnalyzer out = ProcessTools.executeTestJvm(args.toArray(new String[args.size()])); ! int exitCode = out.getExitValue(); ! if (exitCode != 0) { ! throw new Error("Test execution failed with exit code " + exitCode); ! } } } --- 59,66 ---- // Construct execution command with compilation policy choice and test name List<String> args = new ArrayList<>(vmArgs); Collections.addAll(args, policy, testName); OutputAnalyzer out = ProcessTools.executeTestJvm(args.toArray(new String[args.size()])); ! out.shouldHaveExitValue(0); } }
< prev index next >