From bb60fe11da4724486a6d30147805d373469708bc Mon Sep 17 00:00:00 2001 From: Rob Stryker Date: Wed, 11 Sep 2024 11:18:33 -0400 Subject: [PATCH] Changes to jenkinsfile and existing test annotations Signed-off-by: Rob Stryker --- Jenkinsfile | 1 + .../META-INF/MANIFEST.MF | 2 +- .../tests/dom/ASTConverterJavadocTest.java | 31 ++++++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ad3edd34c81..8bb36cd7bc2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { # Build and test without DOM-first to ensure no regression takes place mvn -U clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \ -Ptest-on-javase-23 -Pbree-libs -Papi-check -Pjavadoc -Pp2-repo \ + -DexcludedGroups=org.eclipse.jdt.core.tests.javac.JavacTestIgnore \ -Dmaven.test.failure.ignore=true \ -Dcompare-version-with-baselines.skip=false \ -Djava.io.tmpdir=$WORKSPACE/tmp -Dproject.build.sourceEncoding=UTF-8 \ diff --git a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF index d6e528b4572..1c90fffe519 100644 --- a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF @@ -16,7 +16,7 @@ Export-Package: org.eclipse.jdt.core.tests, Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)", org.eclipse.jdt.core;bundle-version="[3.38.0,4.0.0)", - org.junit;bundle-version="3.8.1", + org.junit;bundle-version="4.13.2", org.eclipse.test.performance;bundle-version="[3.1.0,4.0.0)", org.eclipse.jdt.core.tests.compiler;bundle-version="[3.4.0,4.0.0)", org.eclipse.jdt.compiler.apt.tests;bundle-version="[1.0.0,2.0.0)", diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java index 01f97a1f5e2..50ee09036b5 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java @@ -69,6 +69,7 @@ import org.eclipse.jdt.core.tests.javac.JavacTestIgnore; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.eclipse.jdt.internal.compiler.parser.ScannerHelper; +import org.junit.experimental.categories.Category; import junit.framework.Test; import junit.framework.TestSuite; @@ -1953,7 +1954,7 @@ public void testBug53276() throws JavaModelException { /** * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=53075" */ - @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) public void testBug53075() throws JavaModelException { ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug53075", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ boolean pb = this.packageBinding; @@ -2005,7 +2006,7 @@ public void testBug51617() throws JavaModelException { this.stopOnFailure = true; } - @JavacTestIgnore(cause=JavacTestIgnore.JDT_BEHAVIOR_STRANGE) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_BEHAVIOR_STRANGE) public void testBug54424() throws JavaModelException { this.stopOnFailure = false; String [] unbound = { "tho", @@ -2040,7 +2041,7 @@ public void testBug63044() throws JavaModelException { /** * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=51660" */ - @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) public void testBug51660() throws JavaModelException { this.stopOnFailure = false; ICompilationUnit unit = getCompilationUnit("Converter" , "src", "javadoc.testBug51660", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ @@ -2133,7 +2134,7 @@ public void testBug51660() throws JavaModelException { * Bug 65174: Spurious "Javadoc: Missing reference" error * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=65174" */ - @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) public void testBug65174() throws JavaModelException { verifyComments("testBug65174"); } @@ -2142,7 +2143,7 @@ public void testBug65174() throws JavaModelException { * Bug 65253: [Javadoc] @@tag is wrongly parsed as @tag * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=65253" */ - @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC) // See https://docs.oracle.com/en/java/javase/22/docs/specs/javadoc/doc-comment-spec.html //@@, to represent @, to prevent it from being interpreted as part of the introduction of a block or inline tag, public void testBug65253() throws JavaModelException { @@ -2210,14 +2211,14 @@ public void testBug68726() throws JavaModelException { * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=70892" * @deprecated using deprecated code */ - @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) public void testBug70892_JLS2() throws JavaModelException { int level = this.astLevel; this.astLevel = AST.JLS2; verifyComments("testBug70892"); this.astLevel = level; } - @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) public void testBug70892_JLS3() throws JavaModelException { int level = this.astLevel; this.astLevel = getJLS3(); @@ -2317,7 +2318,7 @@ public void testBug79904() throws JavaModelException { * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=80221" */ // Resolving "Object" should not be controversial since it is a well known type - @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL) public void testBug80221() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.astLevel = getJLS3(); @@ -2574,7 +2575,7 @@ public void testBug93880_15b() throws JavaModelException { } } - @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC) public void testBug93880_15c() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.astLevel = getJLS3(); @@ -2792,7 +2793,7 @@ public void testBug94150() throws JavaModelException { * Bug 99507: [javadoc] Infinit loop in DocCommentParser * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=99507" */ - @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC) public void testBug99507() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b99507/X.java", @@ -2979,7 +2980,7 @@ public void testBug100041c() throws JavaModelException { // Syntax like @See I.VE#I.VE(params) is not allowed by javac, specifically // the dot in the method name is not allowed and causes a DCErroneous // See https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see - @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS) public void testBug103304() throws JavaModelException { this.packageBinding = false; // do NOT verify that qualification only can be package name this.workingCopies = new ICompilationUnit[1]; @@ -3289,7 +3290,7 @@ public void testBug125676() throws JavaModelException { * bug125903: [javadoc] Treat whitespace in javadoc tags as invalid tags * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=125903" */ - @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) public void testBug125903() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.astLevel = getJLS3(); @@ -3447,7 +3448,7 @@ public void testBug228648() throws JavaModelException { verifyComments(unit); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=196714 - @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL) public void test109() throws JavaModelException { verifyComments("test109"); } @@ -3535,7 +3536,7 @@ public void testBug481143c() throws JavaModelException { * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=206345" * @deprecated */ - @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) public void testBug206345a() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.astLevel = AST.JLS3; @@ -3583,7 +3584,7 @@ public void testBug206345a() throws JavaModelException { * * @deprecated */ - @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) + @Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR) public void testBug206345b() throws JavaModelException { this.workingCopies = new ICompilationUnit[1]; this.astLevel = AST.JLS3;