Skip to content

Commit

Permalink
POMs: one more fix to run testing/story in "extratest" profile
Browse files Browse the repository at this point in the history
Mismatch between <skip> and <skipTests> elements, now documented
in comments.
  • Loading branch information
virgo47 committed Mar 5, 2020
1 parent 55af389 commit 5d9b9a9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Expand Up @@ -2042,7 +2042,8 @@
<!--
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.
See testing/pom.xml for more on "extra" tests, but we need to skip tests here to disable
the default unit/integration tests covered by default "mvn clean install" build.
-->
<profile>
<id>extratest</id>
Expand Down
21 changes: 19 additions & 2 deletions testing/pom.xml
Expand Up @@ -25,11 +25,20 @@
<module>sanity</module>
<!--
The following modules skip tests by default, but we ALWAYS want to build the sources.
Tests are run in "long" CI builds, skip=false semantic is used.
That's why we don't want to add modules optionally based on profile.
Tests for selected modules are run in "long" CI build, see "extratest" profile lower.
Tests for a single module can be enabled by a property - skipXyTests=false semantic is used.
(I'd like to use "runXyTests", but that would require more POM code, sorry.)
See each POM for property controlling the tests - typically for "module-name" it's:
-Dskip<ModuleName>Tests=false (default value is true)
We try to avoid repeating "tests" in the property name, check its exact spelling in POMs.
If skip is set to false, values of skipTests/skipITs are not applied for these modules.
If "skipXyTests" is set to false, property "skipTests" from command line is ignored
Property "skipITs" still works, but it doesn't make sense to use it as it goes against
the instruction to run the extra tests.
All extra tests are run by failsafe, so they are considered integration tests.
-->
<module>conntest</module>
<module>longtest</module>
Expand Down Expand Up @@ -59,6 +68,14 @@
<profile>
<id>extratest</id>
<properties>
<!--
NOTE: To disable normal tests from default build (mvn clean install), we use
"skipTest" element - this repeats our intent from parent POM.
IT IS IMPORTANT to use this element to flip it back to "false" in POMs below.
If we use element "skip" and set it to false, skipTests is still "true" and the
whole testing is skipped. It's not necessary to define "skip" element, but it's
super-important to use "skipTests" consistently. Don't get burned like me.
-->
<skipTests>true</skipTests>
<!-- Conntests are not ready to run in "long" build yet. -->
<!--<skipConnTests>false</skipConnTests>-->
Expand Down
2 changes: 1 addition & 1 deletion testing/story/pom.xml
Expand Up @@ -306,7 +306,7 @@
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>${skipStoryTests}</skip>
<skipTests>${skipStoryTests}</skipTests>
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
Expand Down

0 comments on commit 5d9b9a9

Please sign in to comment.