提交 b14abe51 编写于 作者: I iignatyev

8027124: [TESTBUG] NonTieredLevelsTest: java.lang.RuntimeException: private...

8027124: [TESTBUG] NonTieredLevelsTest: java.lang.RuntimeException: private TestCase$Helper(java.lang.Object) must be osr_compiled
Reviewed-by: kvn, roland
上级 704d4ce3
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -70,6 +70,9 @@ public class NonTieredLevelsTest extends CompLevelsTest {
@Override
protected void test() throws Exception {
if (skipXcompOSR()) {
return;
}
checkNotCompiled();
compile();
checkCompiled();
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -51,6 +51,9 @@ public class TieredLevelsTest extends CompLevelsTest {
@Override
protected void test() throws Exception {
if (skipXcompOSR()) {
return;
}
checkNotCompiled();
compile();
checkCompiled();
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -380,6 +380,20 @@ public abstract class CompilerWhiteBoxTest {
/** flag for OSR test case */
boolean isOsr();
}
/**
* @return {@code true} if the current test case is OSR and the mode is
* Xcomp, otherwise {@code false}
*/
protected boolean skipXcompOSR() {
boolean result = testCase.isOsr()
&& CompilerWhiteBoxTest.MODE.startsWith("compiled ");
if (result && IS_VERBOSE) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
}
return result;
}
}
enum SimpleTestCase implements CompilerWhiteBoxTest.TestCase {
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -51,11 +51,8 @@ public class DeoptimizeAllTest extends CompilerWhiteBoxTest {
*/
@Override
protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith(
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return;
if (skipXcompOSR()) {
return;
}
compile();
checkCompiled();
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -51,11 +51,8 @@ public class DeoptimizeMethodTest extends CompilerWhiteBoxTest {
*/
@Override
protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith(
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return;
if (skipXcompOSR()) {
return;
}
compile();
checkCompiled();
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -66,10 +66,7 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
*/
@Override
protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith(
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
if (skipXcompOSR()) {
return;
}
if (!isCompilable()) {
......
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014, 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
......@@ -53,11 +53,8 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
*/
@Override
protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith(
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return;
if (skipXcompOSR()) {
return;
}
checkNotCompiled();
if (!isCompilable()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册