Skip to content

Commit

Permalink
Update jenkinsfile to filter annotated tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <[email protected]>

Fix excludedGroup problem: surefire cant find annotation class

Signed-off-by: Rob Stryker <[email protected]>

Oops
  • Loading branch information
Rob Stryker committed Sep 13, 2024
1 parent 4c887bc commit 788e175
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
8 changes: 7 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ 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 \
-Dtycho.surefire.argLine="--add-modules ALL-SYSTEM -Dcompliance=1.8,11,17,21,23 -Djdt.performance.asserts=disabled" \
-DfailIfNoTests=false \
-DexcludedGroups=org.junit.Ignore \
-DproviderHint=junit47 \
-DDetectVMInstallationsJob.disabled=true \
-Dtycho.apitools.debug \
-Dtycho.debug.artifactcomparator \
Expand Down Expand Up @@ -76,6 +78,10 @@ pipeline {
mvn verify --batch-mode -f org.eclipse.jdt.core.tests.javac \
--fail-at-end -Ptest-on-javase-23 -Pbree-libs \
-Papi-check -Djava.io.tmpdir=$WORKSPACE/tmp -Dproject.build.sourceEncoding=UTF-8 \
-DfailIfNoTests=false \
-DexcludedGroups=org.junit.Ignore \
-DproviderHint=junit47 \
-Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
"""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.Ignore;
import org.junit.experimental.categories.Category;

import junit.framework.Test;
Expand Down Expand Up @@ -1954,7 +1955,7 @@ public void testBug53276() throws JavaModelException {
/**
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=53075"
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
@Category(value=Ignore.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;
Expand Down Expand Up @@ -2006,7 +2007,7 @@ public void testBug51617() throws JavaModelException {
this.stopOnFailure = true;
}

@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_BEHAVIOR_STRANGE)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_BEHAVIOR_STRANGE)
public void testBug54424() throws JavaModelException {
this.stopOnFailure = false;
String [] unbound = { "tho",
Expand Down Expand Up @@ -2041,7 +2042,7 @@ public void testBug63044() throws JavaModelException {
/**
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=51660"
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
@Category(value=Ignore.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$
Expand Down Expand Up @@ -2134,7 +2135,7 @@ public void testBug51660() throws JavaModelException {
* Bug 65174: Spurious "Javadoc: Missing reference" error
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=65174"
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
public void testBug65174() throws JavaModelException {
verifyComments("testBug65174");
}
Expand All @@ -2143,7 +2144,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"
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC)
@Category(value=Ignore.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 {
Expand Down Expand Up @@ -2211,14 +2212,14 @@ public void testBug68726() throws JavaModelException {
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=70892"
* @deprecated using deprecated code
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
@Category(value=Ignore.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;
}
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
public void testBug70892_JLS3() throws JavaModelException {
int level = this.astLevel;
this.astLevel = getJLS3();
Expand Down Expand Up @@ -2318,7 +2319,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
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL)
public void testBug80221() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.astLevel = getJLS3();
Expand Down Expand Up @@ -2575,7 +2576,7 @@ public void testBug93880_15b() throws JavaModelException {
}
}

@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC)
public void testBug93880_15c() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.astLevel = getJLS3();
Expand Down Expand Up @@ -2793,7 +2794,7 @@ public void testBug94150() throws JavaModelException {
* Bug 99507: [javadoc] Infinit loop in DocCommentParser
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=99507"
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC)
@Category(value=Ignore.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",
Expand Down Expand Up @@ -2980,7 +2981,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
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_RECOVERS_FROM_BAD_INPUTS)
@Category(value=Ignore.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];
Expand Down Expand Up @@ -3290,7 +3291,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"
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
public void testBug125903() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.astLevel = getJLS3();
Expand Down Expand Up @@ -3448,7 +3449,7 @@ public void testBug228648() throws JavaModelException {
verifyComments(unit);
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=196714
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.VALID_ALTERNATIVE_IMPL)
public void test109() throws JavaModelException {
verifyComments("test109");
}
Expand Down Expand Up @@ -3536,7 +3537,7 @@ public void testBug481143c() throws JavaModelException {
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=206345"
* @deprecated
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
public void testBug206345a() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.astLevel = AST.JLS3;
Expand Down Expand Up @@ -3584,7 +3585,7 @@ public void testBug206345a() throws JavaModelException {
*
* @deprecated
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.TESTS_SPECIFIC_RESULT_FOR_UNDEFINED_BEHAVIOR)
public void testBug206345b() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
this.astLevel = AST.JLS3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.jdt.core.tests.javac.JavacTestIgnore;
import org.eclipse.jdt.core.util.IModifierConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.junit.Ignore;
import org.junit.experimental.categories.Category;

import junit.framework.Test;
Expand Down Expand Up @@ -3345,7 +3346,7 @@ public void test0146() throws JavaModelException {
* Checking initializers
* @deprecated marking deprecated since using deprecated code
*/
@Category(value=JavacTestIgnore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC)
@Category(value=Ignore.class) @JavacTestIgnore(cause=JavacTestIgnore.JDT_VIOLATES_SPEC)
public void test0147() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
Expand Down

0 comments on commit 788e175

Please sign in to comment.