diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-11-13 13:28:58 +0100 |
---|---|---|
committer | Eric Hartmann <hartmann.eric@gmail.Com> | 2017-11-14 13:10:17 +0100 |
commit | d9c39ef73d5df4b6a868fbc4802b142fc3a256c4 (patch) | |
tree | bcbc1071e0f649e1a752104c20c1e3db02e8e08d | |
parent | e6a34bf608d8fab312a9996ac87abb0992525424 (diff) | |
download | sonarqube-d9c39ef73d5df4b6a868fbc4802b142fc3a256c4.tar.gz sonarqube-d9c39ef73d5df4b6a868fbc4802b142fc3a256c4.zip |
Speed-up execute of categories in CIX
-rwxr-xr-x | cix.sh | 36 | ||||
-rwxr-xr-x | run-integration-tests.sh | 4 | ||||
-rw-r--r-- | tests/pom.xml | 4 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Category1Suite.java | 5 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Category2Suite.java | 5 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Category3Suite.java | 5 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Category4Suite.java | 5 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Category5Suite.java | 4 | ||||
-rw-r--r-- | tests/src/test/java/org/sonarqube/tests/Category6Suite.java | 4 |
9 files changed, 44 insertions, 28 deletions
@@ -3,16 +3,6 @@ set -euo pipefail -function runCategory { - mvn verify \ - -f tests/pom.xml \ - -Dcategory=$CATEGORY \ - -Dorchestrator.configUrl=http://infra.internal.sonarsource.com/jenkins/orch-$DB_ENGINE.properties \ - -Dorchestrator.workspace=target/$CATEGORY \ - -Dwith-db-drivers \ - -B -e -V -} - case "$RUN_ACTIVITY" in run-db-unit-tests-*) @@ -32,35 +22,27 @@ case "$RUN_ACTIVITY" in case "$CATEGORY_GROUP" in Category1) - CATEGORY=Category1 && runCategory - CATEGORY=authorization && runCategory - CATEGORY=measure && runCategory - CATEGORY=qualityGate && runCategory - CATEGORY=source && runCategory + CATEGORY="Category1|authorization|measure|qualityGate|source" ;; Category2) - CATEGORY=Category2 && runCategory - CATEGORY=test && runCategory - CATEGORY=qualityModel && runCategory + CATEGORY="Category2|test|qualityModel" ;; Category3) - CATEGORY=Category3 && runCategory + CATEGORY="Category3" ;; Category4) - CATEGORY=Category4 && runCategory - CATEGORY=duplication && runCategory + CATEGORY="Category4|duplication" ;; Category5) - CATEGORY=Category5 && runCategory + CATEGORY="Category5" ;; Category6) - CATEGORY=Category6 && runCategory - CATEGORY=organization && runCategory + CATEGORY="Category6|organization" ;; *) @@ -69,6 +51,12 @@ case "$RUN_ACTIVITY" in ;; esac + mvn verify \ + -f tests/pom.xml \ + -Dcategory="$CATEGORY" \ + -Dorchestrator.configUrl="http://infra.internal.sonarsource.com/jenkins/orch-$DB_ENGINE.properties" \ + -Pwith-db-drivers \ + -B -e -V fi ;; diff --git a/run-integration-tests.sh b/run-integration-tests.sh index 98bf40a7ba8..82ea7a8b1a2 100755 --- a/run-integration-tests.sh +++ b/run-integration-tests.sh @@ -21,7 +21,7 @@ mvn clean package -B -e -V cd .. mvn verify \ - -Dcategory=$CATEGORY \ + -Dcategory="$CATEGORY" \ -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \ - -Dwith-db-drivers \ + -Pwith-db-drivers \ -B -e -V $* diff --git a/tests/pom.xml b/tests/pom.xml index 225776d69f2..36edfa2bc3f 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -167,10 +167,10 @@ </argLine> <skipTests>${skipIts}</skipTests> <includes> - <include>*/${category}/*Suite.java</include> + <include>%regex[.*/(${category})/.*Suite.class]</include> <!-- deprecated categories --> - <include>*/*${category}Suite.java</include> + <include>%regex[.*/(${category})Suite.class]</include> </includes> </configuration> </plugin> diff --git a/tests/src/test/java/org/sonarqube/tests/Category1Suite.java b/tests/src/test/java/org/sonarqube/tests/Category1Suite.java index 2f48113bddc..2393e681879 100644 --- a/tests/src/test/java/org/sonarqube/tests/Category1Suite.java +++ b/tests/src/test/java/org/sonarqube/tests/Category1Suite.java @@ -38,6 +38,11 @@ import org.sonarqube.tests.user.UsersPageTest; import static util.ItUtils.pluginArtifact; import static util.ItUtils.xooPlugin; +/** + * @deprecated use dedicated suites in each package (see {@link org.sonarqube.tests.measure.MeasureSuite} + * for instance) + */ +@Deprecated @RunWith(Suite.class) @Suite.SuiteClasses({ // administration diff --git a/tests/src/test/java/org/sonarqube/tests/Category2Suite.java b/tests/src/test/java/org/sonarqube/tests/Category2Suite.java index 7960b0ddf0b..03fd21935d7 100644 --- a/tests/src/test/java/org/sonarqube/tests/Category2Suite.java +++ b/tests/src/test/java/org/sonarqube/tests/Category2Suite.java @@ -47,6 +47,11 @@ import org.sonarqube.tests.rule.RulesPageTest; import static util.ItUtils.pluginArtifact; import static util.ItUtils.xooPlugin; +/** + * @deprecated use dedicated suites in each package (see {@link org.sonarqube.tests.measure.MeasureSuite} + * for instance) + */ +@Deprecated @RunWith(Suite.class) @Suite.SuiteClasses({ // issue diff --git a/tests/src/test/java/org/sonarqube/tests/Category3Suite.java b/tests/src/test/java/org/sonarqube/tests/Category3Suite.java index e5fbb821543..fe4e68350b5 100644 --- a/tests/src/test/java/org/sonarqube/tests/Category3Suite.java +++ b/tests/src/test/java/org/sonarqube/tests/Category3Suite.java @@ -43,6 +43,11 @@ import org.sonarqube.tests.webhook.WebhooksTest; import static util.ItUtils.pluginArtifact; import static util.ItUtils.xooPlugin; +/** + * @deprecated use dedicated suites in each package (see {@link org.sonarqube.tests.measure.MeasureSuite} + * for instance) + */ +@Deprecated @RunWith(Suite.class) @Suite.SuiteClasses({ // analysis diff --git a/tests/src/test/java/org/sonarqube/tests/Category4Suite.java b/tests/src/test/java/org/sonarqube/tests/Category4Suite.java index f1ff5a039d8..6c2d14ae4ba 100644 --- a/tests/src/test/java/org/sonarqube/tests/Category4Suite.java +++ b/tests/src/test/java/org/sonarqube/tests/Category4Suite.java @@ -51,6 +51,11 @@ import org.sonarqube.tests.ws.WsTest; import static util.ItUtils.pluginArtifact; import static util.ItUtils.xooPlugin; +/** + * @deprecated use dedicated suites in each package (see {@link org.sonarqube.tests.measure.MeasureSuite} + * for instance) + */ +@Deprecated @RunWith(Suite.class) @Suite.SuiteClasses({ // organization diff --git a/tests/src/test/java/org/sonarqube/tests/Category5Suite.java b/tests/src/test/java/org/sonarqube/tests/Category5Suite.java index a5bc316c09f..feb6936b30b 100644 --- a/tests/src/test/java/org/sonarqube/tests/Category5Suite.java +++ b/tests/src/test/java/org/sonarqube/tests/Category5Suite.java @@ -45,7 +45,11 @@ import org.sonarqube.tests.user.UserEsResilienceTest; * This suite is reserved to the tests that start their own instance of Orchestrator. * Indeed multiple instances of Orchestrator can't be started in parallel, so this * suite does not declare a shared Orchestrator. + * + * @deprecated use dedicated suites in each package (see {@link org.sonarqube.tests.measure.MeasureSuite} + * for instance) */ +@Deprecated @RunWith(Suite.class) @Suite.SuiteClasses({ ServerSystemRestartingOrchestrator.class, diff --git a/tests/src/test/java/org/sonarqube/tests/Category6Suite.java b/tests/src/test/java/org/sonarqube/tests/Category6Suite.java index dd582a25cd3..87ebf3ac247 100644 --- a/tests/src/test/java/org/sonarqube/tests/Category6Suite.java +++ b/tests/src/test/java/org/sonarqube/tests/Category6Suite.java @@ -49,7 +49,11 @@ import static util.ItUtils.xooPlugin; /** * This category is used only when organizations feature is activated + * + * @deprecated use dedicated suites in each package (see {@link org.sonarqube.tests.measure.MeasureSuite} + * for instance) */ +@Deprecated @RunWith(Suite.class) @Suite.SuiteClasses({ OrganizationIdentityProviderTest.class, |