提交 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -70,6 +70,9 @@ public class NonTieredLevelsTest extends CompLevelsTest { ...@@ -70,6 +70,9 @@ public class NonTieredLevelsTest extends CompLevelsTest {
@Override @Override
protected void test() throws Exception { protected void test() throws Exception {
if (skipXcompOSR()) {
return;
}
checkNotCompiled(); checkNotCompiled();
compile(); compile();
checkCompiled(); 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -51,6 +51,9 @@ public class TieredLevelsTest extends CompLevelsTest { ...@@ -51,6 +51,9 @@ public class TieredLevelsTest extends CompLevelsTest {
@Override @Override
protected void test() throws Exception { protected void test() throws Exception {
if (skipXcompOSR()) {
return;
}
checkNotCompiled(); checkNotCompiled();
compile(); compile();
checkCompiled(); 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -380,6 +380,20 @@ public abstract class CompilerWhiteBoxTest { ...@@ -380,6 +380,20 @@ public abstract class CompilerWhiteBoxTest {
/** flag for OSR test case */ /** flag for OSR test case */
boolean isOsr(); 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 { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -51,10 +51,7 @@ public class DeoptimizeAllTest extends CompilerWhiteBoxTest { ...@@ -51,10 +51,7 @@ public class DeoptimizeAllTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith( if (skipXcompOSR()) {
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return; return;
} }
compile(); compile();
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -51,10 +51,7 @@ public class DeoptimizeMethodTest extends CompilerWhiteBoxTest { ...@@ -51,10 +51,7 @@ public class DeoptimizeMethodTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith( if (skipXcompOSR()) {
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return; return;
} }
compile(); compile();
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -66,10 +66,7 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest { ...@@ -66,10 +66,7 @@ public class IsMethodCompilableTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith( if (skipXcompOSR()) {
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return; return;
} }
if (!isCompilable()) { 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -53,10 +53,7 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest { ...@@ -53,10 +53,7 @@ public class MakeMethodNotCompilableTest extends CompilerWhiteBoxTest {
*/ */
@Override @Override
protected void test() throws Exception { protected void test() throws Exception {
if (testCase.isOsr() && CompilerWhiteBoxTest.MODE.startsWith( if (skipXcompOSR()) {
"compiled ")) {
System.err.printf("Warning: %s is not applicable in %s%n",
testCase.name(), CompilerWhiteBoxTest.MODE);
return; return;
} }
checkNotCompiled(); checkNotCompiled();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册