Mercurial > hg > truffle
changeset 17711:d559dbbded7a
8027124: [TESTBUG] NonTieredLevelsTest: java.lang.RuntimeException: private TestCase$Helper(java.lang.Object) must be osr_compiled
Reviewed-by: kvn, roland
author | iignatyev |
---|---|
date | Thu, 06 Mar 2014 12:47:45 +0400 |
parents | 57e40b260938 |
children | d64ae45dbce9 |
files | test/compiler/tiered/NonTieredLevelsTest.java test/compiler/tiered/TieredLevelsTest.java test/compiler/whitebox/CompilerWhiteBoxTest.java test/compiler/whitebox/DeoptimizeAllTest.java test/compiler/whitebox/DeoptimizeMethodTest.java test/compiler/whitebox/IsMethodCompilableTest.java test/compiler/whitebox/MakeMethodNotCompilableTest.java |
diffstat | 7 files changed, 34 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/test/compiler/tiered/NonTieredLevelsTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/tiered/NonTieredLevelsTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ @Override protected void test() throws Exception { + if (skipXcompOSR()) { + return; + } checkNotCompiled(); compile(); checkCompiled();
--- a/test/compiler/tiered/TieredLevelsTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/tiered/TieredLevelsTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ @Override protected void test() throws Exception { + if (skipXcompOSR()) { + return; + } checkNotCompiled(); compile(); checkCompiled();
--- a/test/compiler/whitebox/CompilerWhiteBoxTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/whitebox/CompilerWhiteBoxTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ /** 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 {
--- a/test/compiler/whitebox/DeoptimizeAllTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/whitebox/DeoptimizeAllTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ */ @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();
--- a/test/compiler/whitebox/DeoptimizeMethodTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/whitebox/DeoptimizeMethodTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ */ @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();
--- a/test/compiler/whitebox/IsMethodCompilableTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/whitebox/IsMethodCompilableTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ */ @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()) {
--- a/test/compiler/whitebox/MakeMethodNotCompilableTest.java Tue Mar 11 16:05:36 2014 -0700 +++ b/test/compiler/whitebox/MakeMethodNotCompilableTest.java Thu Mar 06 12:47:45 2014 +0400 @@ -1,5 +1,5 @@ /* - * 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 @@ */ @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()) {