Skip to content

Commit

Permalink
POMs: reintroduced profile "extratest" for convenience ("long" build)
Browse files Browse the repository at this point in the history
The profile includes also conntest, no separate profile for that module,
but we can run extra tests for any single module with -D... switch.
All is documented in main POM and testing/pom.xml.
State of Schrodinger is ... well, it's Schrodinger, so unknown. :-)
  • Loading branch information
virgo47 committed Mar 3, 2020
1 parent 3059dab commit d011117
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 54 deletions.
10 changes: 0 additions & 10 deletions dist/testng-integration.xml

This file was deleted.

10 changes: 0 additions & 10 deletions dist/testng-unit.xml

This file was deleted.

45 changes: 33 additions & 12 deletions pom.xml
Expand Up @@ -23,25 +23,34 @@
- Test JARs of some modules are created, installed/deployed and used downstream (search for test-jar).
VARIOUS MVN COMMANDS (with rough times on average notebook)
Note: Javadoc takes long time but it's only part of the "dist" profile (active by default).
Hence, " -Dmaven.javadoc.skip" is not necessary with "-P -dist".
Quick run without any tests (~6m):
mvn clean install -P -dist -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip
Quick developer's run without any tests, skipping distribution (~6m):
mvn clean install -P -dist -DskipTests -Dcheckstyle.skip
"Quick" build with unit tests only and checkstyle (~30m):
mvn clean install -P -dist -DskipITs -Dmaven.javadoc.skip
mvn clean install -P -dist -DskipITs
"Quick" build with smaller integration test (~1h20m):
mvn clean install -P -dist -DintegrationTestSuite=fast -Dmaven.javadoc.skip
"Quick" build with smaller/faster set of integration test (~1h20m):
mvn clean install -P -dist -DintegrationTestSuite=fast
Running tests of a selected module (-pl) with output to stdout (don't use stdout for complete build, it's too much):
mvn clean install -DredirectTestOutputToFile=false -pl model/model-intest
Default build - creates distribution package, runs all tests except "extra" tests ():
mvn clean install
Extra test run with custom JVM args (we have 16g on CI server, but it works without args too),
runs just under 900 tests, skips distribution and any common unit/IT tests (~1h50m):
mvn clean install -P extratest,-dist -Dsurefire.args="-Xmx8g" -Dfailsafe.args="-Xmx8g -Duser.language=en"
Extra test run for a single module, -D property matches the module in -pl:
mvn clean install -DskipConnTests=false -pl testing/conntest
Long test run (with 16g on CI server, but this should work too - isn't Xmx even unnecessary?),
runs just under 900 tests (~1h50m):
mvn -P tomcat,extratest clean install -Dsurefire.args="-Xmx8g" -Dfailsafe.args="-Xmx8g -Duser.language=en"
Full build with extra tests for a single module, "-DskipTests" suppresses other default tests:
mvn clean install -P -dist -DskipTests -DskipStoryTests=false
See "extratest" profile in testing/pom.xml for all individual properties enabling extra tests.
Comprehensive quick build/dist with normally excluded modules including checkstyle, but no tests/javadoc (~13m):
mvn clean install -P dist,extratest,conntest,schrodinger -DskipTests -Dmaven.javadoc.skip
Running unit+IT tests of a selected module (-pl) with output to stdout:
mvn clean install -DredirectTestOutputToFile=false -pl model/model-intest
-->

<groupId>com.evolveum.midpoint</groupId>
Expand Down Expand Up @@ -2030,6 +2039,18 @@
</modules>
</profile>

<!--
Activating extra tests (tests under testing module), skipping other tests.
Often we want to combine with disabling dist: -P extratest,-dist
See testing/pom.xml for more on "extra" tests, here we just skip the default tests.
-->
<profile>
<id>extratest</id>
<properties>
<skipTests>true</skipTests>
</properties>
</profile>

<profile>
<id>jdk-11</id>
<properties>
Expand Down
5 changes: 0 additions & 5 deletions testing/conntest/pom.xml
Expand Up @@ -19,11 +19,6 @@

<name>midPoint Testing - Resource Connection Tests</name>

<properties>
<!-- See comment in testing parent module. -->
<skipConnTests>true</skipConnTests>
</properties>

<dependencies>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
Expand Down
5 changes: 0 additions & 5 deletions testing/longtest/pom.xml
Expand Up @@ -19,11 +19,6 @@

<name>midPoint Testing - Long Tests</name>

<properties>
<!-- See comment in testing parent module. -->
<skipLongTests>true</skipLongTests>
</properties>

<dependencies>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
Expand Down
24 changes: 24 additions & 0 deletions testing/pom.xml
Expand Up @@ -44,5 +44,29 @@
<!-- This applies to all testing submodules, all of them have only src/test, not main. -->
<maven.install.skip>true</maven.install.skip>
<maven.deploy.skip>true</maven.deploy.skip>

<!-- Properties controlling "extra" test modules. See "extratest" profile lower. -->
<skipConnTests>true</skipConnTests>
<skipLongTests>true</skipLongTests>
<skipRestTests>true</skipRestTests>
<skipSamplesTests>true</skipSamplesTests>
<skipStoryTests>true</skipStoryTests>
<!-- By default we skip Schrodinger tests. This is not part of "extra" tests. -->
<skipSchrodingerTests>true</skipSchrodingerTests>
</properties>

<profiles>
<profile>
<id>extratest</id>
<properties>
<skipTests>true</skipTests>
<skipConnTests>false</skipConnTests>
<skipLongTests>false</skipLongTests>
<skipRestTests>false</skipRestTests>
<skipSamplesTests>false</skipSamplesTests>
<skipStoryTests>false</skipStoryTests>
<!-- Schrodinger tests are separate, we don't want them in this profile -->
</properties>
</profile>
</profiles>
</project>
5 changes: 0 additions & 5 deletions testing/rest/pom.xml
Expand Up @@ -19,11 +19,6 @@

<name>midPoint Testing - REST API</name>

<properties>
<!-- See comment in testing parent module. -->
<skipRestTests>true</skipRestTests>
</properties>

<dependencies>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
Expand Down
5 changes: 0 additions & 5 deletions testing/samples-test/pom.xml
Expand Up @@ -19,11 +19,6 @@

<name>midPoint Samples - Test</name>

<properties>
<!-- See comment in testing parent module. -->
<skipSamplesTests>true</skipSamplesTests>
</properties>

<dependencies>
<!-- TEST dependency -->
<dependency>
Expand Down
2 changes: 0 additions & 2 deletions testing/schrodingertest/pom.xml
Expand Up @@ -28,8 +28,6 @@
-->
<project.starter.module>../../gui/admin-gui</project.starter.module>
<project.app.package.name>com.evolveum.midpoint.web.boot.MidPointSpringApplication</project.app.package.name>
<!-- See comment in testing parent module. -->
<skipSchrodingerTests>true</skipSchrodingerTests>
<server.port>8180</server.port>
<midpoint.host>0.0.0.0</midpoint.host>
<midpoint.home></midpoint.home>
Expand Down

0 comments on commit d011117

Please sign in to comment.