8140453: compiler control test failed with RuntimeException: CompileCommand: nonexistent missing

Replace incorrect check for validity of method pattern with full command check

Reviewed-by: kvn
This commit is contained in:
Pavel Punegov 2015-10-28 16:26:42 +03:00
parent 2abe5caf98
commit c95fc22507
2 changed files with 7 additions and 15 deletions

View File

@ -23,8 +23,6 @@
package compiler.compilercontrol.share.processors;
import compiler.compilercontrol.share.method.MethodDescriptor;
import compiler.compilercontrol.share.scenario.Command;
import compiler.compilercontrol.share.scenario.CompileCommand;
import jdk.test.lib.OutputAnalyzer;
@ -44,12 +42,10 @@ public class CommandProcessor implements Consumer<OutputAnalyzer> {
@Override
public void accept(OutputAnalyzer outputAnalyzer) {
for (CompileCommand command : commands) {
MethodDescriptor methodDescriptor = command.methodDescriptor;
if (methodDescriptor.isValid()) {
Command cmd = command.command;
String method = methodDescriptor.getCanonicalString();
outputAnalyzer.shouldContain("CompileCommand: " + cmd.name
+ " " + method);
if (command.isValid()) {
outputAnalyzer.shouldContain("CompileCommand: "
+ command.command.name + " "
+ command.methodDescriptor.getCanonicalString());
outputAnalyzer.shouldNotContain("CompileCommand: An error "
+ "occurred during parsing");
} else {

View File

@ -23,8 +23,6 @@
package compiler.compilercontrol.share.processors;
import compiler.compilercontrol.share.method.MethodDescriptor;
import compiler.compilercontrol.share.scenario.Command;
import compiler.compilercontrol.share.scenario.CompileCommand;
import jdk.test.lib.OutputAnalyzer;
@ -41,12 +39,10 @@ public class QuietProcessor implements Consumer<OutputAnalyzer> {
@Override
public void accept(OutputAnalyzer outputAnalyzer) {
for (CompileCommand command : commands) {
MethodDescriptor methodDescriptor = command.methodDescriptor;
if (methodDescriptor.isValid()) {
Command cmd = command.command;
String method = methodDescriptor.getCanonicalString();
if (command.isValid()) {
outputAnalyzer.shouldNotContain("CompileCommand: "
+ cmd.name + " " + method);
+ command.command.name + " "
+ command.methodDescriptor.getCanonicalString());
outputAnalyzer.shouldNotContain("CompileCommand: An error "
+ "occurred during parsing");
} else {