Skip to content

Commit

Permalink
8302203: IR framework should detect non-compilable test methods early
Browse files Browse the repository at this point in the history
Reviewed-by: chagedorn, kvn
  • Loading branch information
TobiHartmann committed Feb 13, 2023
1 parent 1fec6b5 commit d1c87a0
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ protected void onStart() {

protected void compileMethod(DeclaredTest test) {
final Method testMethod = test.getTestMethod();
TestRun.check(WHITE_BOX.isMethodCompilable(testMethod, test.getCompLevel().getValue(), false),
"Method " + testMethod + " not compilable at level " + test.getCompLevel()
+ ". Did you use compileonly without including all @Test methods?");
TestRun.check(WHITE_BOX.isMethodCompilable(testMethod),
"Method " + testMethod + " not compilable at level " + test.getCompLevel()
+ ". Did you use compileonly without including all @Test methods?");
if (TestFramework.VERBOSE) {
System.out.println("Compile method " + testMethod + " after warm-up...");
}
Expand Down Expand Up @@ -163,7 +157,10 @@ protected void compileMethod(DeclaredTest test) {
}

private void enqueueMethodForCompilation(DeclaredTest test) {
TestVM.enqueueForCompilation(test.getTestMethod(), test.getCompLevel());
final Method testMethod = test.getTestMethod();
TestRun.check(WHITE_BOX.isMethodCompilable(testMethod, test.getCompLevel().getValue(), false),
"Method " + testMethod + " not compilable (anymore) at level " + test.getCompLevel());
TestVM.enqueueForCompilation(testMethod, test.getCompLevel());
}

protected void checkCompilationLevel(DeclaredTest test) {
Expand Down

1 comment on commit d1c87a0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.