Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5296 from bjhargrave/issues/5295
maven: Add testFailureIgnore configuration to bnd-testing-maven-plugin
- Loading branch information
Showing
15 changed files
with
211 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test-Cases: ${classes;CONCRETE;PUBLIC;NAMED;*Test} |
10 changes: 10 additions & 0 deletions
10
maven/bnd-testing-maven-plugin/src/it/test-failure/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
invoker.goals=--no-transfer-progress integration-test | ||
|
||
# Run mvn with --debug for debug logging | ||
#invoker.debug=true | ||
|
||
# The expected result of the build, possible values are "success" (default) and "failure" | ||
invoker.buildResult=failure | ||
|
||
# Run mvn in debugging mode and wait for a debugger to attach | ||
#invoker.environmentVariables.MAVEN_DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000 |
49 changes: 49 additions & 0 deletions
49
maven/bnd-testing-maven-plugin/src/it/test-failure/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>biz.aQute.bnd-test</groupId> | ||
<artifactId>test</artifactId> | ||
<version>0.0.1</version> | ||
<relativePath>../parent</relativePath> | ||
</parent> | ||
|
||
<groupId>biz.aQute.bnd-test</groupId> | ||
<artifactId>test-failure</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>osgi.core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>biz.aQute.junit</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>org.apache.felix.framework</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-testing-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-indexer-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
15 changes: 15 additions & 0 deletions
15
...n/bnd-testing-maven-plugin/src/it/test-failure/src/main/java/bnd/test/FailingBndTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package bnd.test; | ||
|
||
import static org.junit.Assert.assertNull; | ||
import static org.osgi.framework.FrameworkUtil.getBundle; | ||
|
||
import org.junit.Test; | ||
|
||
public class FailingBndTest { | ||
|
||
@Test | ||
public void test() { | ||
assertNull(getBundle(FailingBndTest.class).getBundleContext()); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
maven/bnd-testing-maven-plugin/src/it/test-failure/src/main/java/bnd/test/SimpleBndTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package bnd.test; | ||
|
||
import static org.junit.Assert.assertNotNull; | ||
import static org.osgi.framework.FrameworkUtil.getBundle; | ||
|
||
import org.junit.Test; | ||
|
||
public class SimpleBndTest { | ||
|
||
@Test | ||
public void test() { | ||
assertNotNull(getBundle(SimpleBndTest.class).getBundleContext()); | ||
} | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
maven/bnd-testing-maven-plugin/src/it/test-failure/test.bndrun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-standalone: target/index.xml | ||
|
||
-runfw: org.apache.felix.framework;version='[5.6.10,5.6.10]' | ||
-runee: JavaSE-1.8 | ||
|
||
-runbundles: biz.aQute.junit, test-failure;version='[0.0.1,0.0.2)' |
1 change: 1 addition & 0 deletions
1
maven/bnd-testing-maven-plugin/src/it/test-ignore-failure/bnd.bnd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test-Cases: ${classes;CONCRETE;PUBLIC;NAMED;*Test} |
7 changes: 7 additions & 0 deletions
7
maven/bnd-testing-maven-plugin/src/it/test-ignore-failure/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
invoker.goals=--no-transfer-progress integration-test | ||
|
||
# Run mvn with --debug for debug logging | ||
#invoker.debug=true | ||
|
||
# Run mvn in debugging mode and wait for a debugger to attach | ||
#invoker.environmentVariables.MAVEN_DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000 |
52 changes: 52 additions & 0 deletions
52
maven/bnd-testing-maven-plugin/src/it/test-ignore-failure/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>biz.aQute.bnd-test</groupId> | ||
<artifactId>test</artifactId> | ||
<version>0.0.1</version> | ||
<relativePath>../parent</relativePath> | ||
</parent> | ||
|
||
<groupId>biz.aQute.bnd-test</groupId> | ||
<artifactId>test-ignore-failure</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>osgi.core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>biz.aQute.junit</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>org.apache.felix.framework</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-testing-maven-plugin</artifactId> | ||
<configuration> | ||
<testFailureIgnore>true</testFailureIgnore> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-indexer-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
9 changes: 9 additions & 0 deletions
9
maven/bnd-testing-maven-plugin/src/it/test-ignore-failure/postbuild.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import groovy.xml.XmlSlurper | ||
|
||
File testsuite_xml = new File(basedir, "target/test-reports/test/TEST-test-ignore-failure-0.0.1.xml") | ||
assert testsuite_xml.isFile(); | ||
testsuite = new XmlSlurper().parse(testsuite_xml) | ||
assert testsuite.@name == "test.test-ignore-failure" | ||
assert testsuite.@tests == 2 | ||
assert testsuite.@errors == 1 | ||
assert testsuite.@failures == 0 |
15 changes: 15 additions & 0 deletions
15
...esting-maven-plugin/src/it/test-ignore-failure/src/main/java/bnd/test/FailingBndTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package bnd.test; | ||
|
||
import static org.junit.Assert.assertNull; | ||
import static org.osgi.framework.FrameworkUtil.getBundle; | ||
|
||
import org.junit.Test; | ||
|
||
public class FailingBndTest { | ||
|
||
@Test | ||
public void test() { | ||
assertNull(getBundle(FailingBndTest.class).getBundleContext()); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...testing-maven-plugin/src/it/test-ignore-failure/src/main/java/bnd/test/SimpleBndTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package bnd.test; | ||
|
||
import static org.junit.Assert.assertNotNull; | ||
import static org.osgi.framework.FrameworkUtil.getBundle; | ||
|
||
import org.junit.Test; | ||
|
||
public class SimpleBndTest { | ||
|
||
@Test | ||
public void test() { | ||
assertNotNull(getBundle(SimpleBndTest.class).getBundleContext()); | ||
} | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
maven/bnd-testing-maven-plugin/src/it/test-ignore-failure/test.bndrun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-standalone: target/index.xml | ||
|
||
-runfw: org.apache.felix.framework;version='[5.6.10,5.6.10]' | ||
-runee: JavaSE-1.8 | ||
|
||
-runbundles: biz.aQute.junit, test-ignore-failure;version='[0.0.1,0.0.2)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters