Skip to content

Commit

Permalink
configured tycho surefire in parent
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Dec 6, 2022
1 parent 86c6813 commit d9c96c9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 162 deletions.
40 changes: 3 additions & 37 deletions dsl/org.eclipse.emf.parsley.dsl.tests/pom.xml
Expand Up @@ -13,25 +13,6 @@
<artifactId>org.eclipse.emf.parsley.dsl.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>

<!--
-XstartOnFirstThread is required by the test
org.eclipse.emf.parsley.dsl.tests.EmfParsleyDslExecutionTest.testGeneratedContentProvider()
which must access the SWT thread
-->
<profiles>
<profile>
<id>macosx-jvm-flags</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
</properties>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -47,24 +28,9 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>default-test</id>
<phase>integration-test</phase>
<configuration>
<skip>${dsl.tests.skip}</skip>
<useUIHarness>false</useUIHarness>
<useUIThread>false</useUIThread>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${uiTestsArgs} ${memoryArgs} ${moduleProperties}</argLine>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${dsl.tests.skip}</skip>
</configuration>
</plugin>

</plugins>
Expand Down
40 changes: 8 additions & 32 deletions dsl/org.eclipse.emf.parsley.dsl.ui.tests/pom.xml
Expand Up @@ -20,9 +20,6 @@
<family>mac</family>
</os>
</activation>
<properties>
<os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -63,35 +60,14 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>default-test</id>
<phase>integration-test</phase>
<configuration>
<skip>${dsl.tests.skip}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${uiTestsArgs} ${pdeTestsArgs} ${moduleProperties}</argLine>
<includes>
<include>**/org/eclipse/emf/parsley/dsl/ui/tests/*Test.java</include>
</includes>
<!-- TODO remove with tycho 1.3 -->
<bundleStartLevel>
<bundle>
<id>org.apache.felix.scr</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
</bundleStartLevel>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${dsl.tests.skip}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<includes>
<include>**/org/eclipse/emf/parsley/dsl/ui/tests/*Test.java</include>
</includes>
</configuration>
</plugin>

<plugin>
Expand Down
16 changes: 16 additions & 0 deletions releng/org.eclipse.emf.parsley.parent/pom.xml
Expand Up @@ -743,6 +743,22 @@
</configuration>
</plugin>

<!-- to skip running (and compiling) tests use commandline flag: -Dmaven.test.skip
To skip tests, but still compile them, use: -DskipTests
To allow all tests in a pom to pass/fail, use commandline flag: -fae (fail
at end) -->
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
<argLine>${previewProperties} ${platformSystemProperties} ${systemProperties} ${moduleProperties} ${additionalTestArguments}</argLine>
<failIfNoTests>false</failIfNoTests>
<useUIHarness>false</useUIHarness>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
28 changes: 1 addition & 27 deletions tests/org.eclipse.emf.parsley.tests.swtbot.cdo/pom.xml
Expand Up @@ -13,20 +13,6 @@
<artifactId>org.eclipse.emf.parsley.tests.swtbot.cdo</artifactId>
<packaging>eclipse-test-plugin</packaging>

<profiles>
<profile>
<id>macosx-jvm-flags</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
</properties>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -37,28 +23,16 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<skip>${swtbot.cdo.tests.skip}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${swtbotTestsArgs} ${moduleProperties}</argLine>
<includes>
<include>**/*Test*.java</include>
</includes>
<!-- TODO remove with tycho 1.3 -->
<bundleStartLevel>
<bundle>
<id>org.apache.felix.scr</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
</bundleStartLevel>
</configuration>
</plugin>

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions tests/org.eclipse.emf.parsley.tests.swtbot.e4/pom.xml
Expand Up @@ -12,20 +12,6 @@

<artifactId>org.eclipse.emf.parsley.tests.swtbot.e4</artifactId>
<packaging>eclipse-test-plugin</packaging>

<profiles>
<profile>
<id>macosx-jvm-flags</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
</properties>
</profile>
</profiles>

<build>
<plugins>
Expand All @@ -37,15 +23,11 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.emf.parsley.examples.eclipse4.product</product>
<application>org.eclipse.e4.ui.workbench.swt.E4Application</application>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${swtbotTestsArgs} ${moduleProperties}</argLine>
<environmentVariables>
<!-- Ubuntu overlay scrollbars cause different crashes in GTK2 so disable them -->
<LIBOVERLAY_SCROLLBAR>0</LIBOVERLAY_SCROLLBAR>
Expand Down
26 changes: 0 additions & 26 deletions tests/org.eclipse.emf.parsley.tests.swtbot.examples/pom.xml
Expand Up @@ -12,20 +12,6 @@

<artifactId>org.eclipse.emf.parsley.tests.swtbot.examples</artifactId>
<packaging>eclipse-test-plugin</packaging>

<profiles>
<profile>
<id>macosx-jvm-flags</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
</properties>
</profile>
</profiles>

<build>
<plugins>
Expand All @@ -37,24 +23,12 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<skip>${swtbot.tests.skip}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.emf.parsley.examples.mail.rcp.product</product>
<application>org.eclipse.emf.parsley.examples.mail.rcp.application</application>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${swtbotTestsArgs} ${moduleProperties}</argLine>
<!-- TODO remove with tycho 1.3 -->
<bundleStartLevel>
<bundle>
<id>org.apache.felix.scr</id>
<level>1</level>
<autoStart>true</autoStart>
</bundle>
</bundleStartLevel>
</configuration>
</plugin>

Expand Down
23 changes: 2 additions & 21 deletions tests/org.eclipse.emf.parsley.tests.swtbot/pom.xml
Expand Up @@ -21,9 +21,6 @@
<family>mac</family>
</os>
</activation>
<properties>
<os-jvm-flags>-XstartOnFirstThread</os-jvm-flags>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -59,7 +56,6 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>default-test</id>
Expand All @@ -68,10 +64,6 @@
<skip>${swtbot.tests.skip}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${swtbotTestsArgs} ${moduleProperties}</argLine>
<testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
<excludes>
<exclude>**/org/eclipse/emf/parsley/tests/swtbot/*WizardsTest*.java</exclude>
<exclude>**/org/eclipse/emf/parsley/tests/swtbot/*DslEditorTest*.java</exclude>
Expand All @@ -91,18 +83,14 @@
</goals>
</execution>
<execution>
<!-- In Hudson DragAndDrop tests seem to be "disturbed" by other tests,
<!-- In CI DragAndDrop tests seem to be "disturbed" by other tests,
so we run them in an isolated run. -->
<id>draganddrop-test</id>
<phase>integration-test</phase>
<configuration>
<skip>${swtbot.tests.skip}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${swtbotTestsArgs} ${moduleProperties}</argLine>
<testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
<excludes>
<exclude>**/org/eclipse/emf/parsley/tests/swtbot/*WizardsTest*.java</exclude>
<exclude>**/org/eclipse/emf/parsley/tests/swtbot/*DslEditorTest*.java</exclude>
Expand All @@ -125,15 +113,8 @@
<phase>integration-test</phase>
<configuration>
<skip>${swtbot.tests.skip}</skip>
<!-- temporary skip these flaky tests
<skip>${swtbot.tests.skip}</skip>
-->
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<!-- tycho.testArgLine repeated to re-use the configuration for argLine
for jacoco agent -->
<argLine>${tycho.testArgLine} ${pdeTestsArgs} ${swtbotTestsArgs} ${moduleProperties}</argLine>
<testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
<excludes>
<exclude>**/org/eclipse/emf/parsley/tests/swtbot/*AbstractTest*.java</exclude>
</excludes>
Expand All @@ -151,7 +132,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
Expand Down
1 change: 0 additions & 1 deletion tests/org.eclipse.emf.parsley.tests/pom.xml
Expand Up @@ -65,7 +65,6 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>default-test</id>
Expand Down

0 comments on commit d9c96c9

Please sign in to comment.