diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-11 10:25:12 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-11 10:51:58 +0100 |
commit | 46b5b59eae490ff19c8e0edbac35031d1773899b (patch) | |
tree | 071c114f65f0baf8819702167a445da7597a63fe | |
parent | 2fca4ebeee81bc01db290e97de7be31f3bf60241 (diff) | |
download | sonarqube-46b5b59eae490ff19c8e0edbac35031d1773899b.tar.gz sonarqube-46b5b59eae490ff19c8e0edbac35031d1773899b.zip |
Fix IT scripts
-rw-r--r-- | .travis.yml | 3 | ||||
-rwxr-xr-x | cix.sh | 2 | ||||
-rwxr-xr-x | quick-build.sh | 4 | ||||
-rwxr-xr-x | run-db-integration-tests.sh | 13 | ||||
-rwxr-xr-x | run-integration-tests.sh | 17 | ||||
-rw-r--r-- | server/sonar-server/pom.xml | 40 | ||||
-rwxr-xr-x | travis.sh | 3 |
7 files changed, 18 insertions, 64 deletions
diff --git a/.travis.yml b/.travis.yml index 77f5cff748c..69aa276a016 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,6 @@ cache: - 'server/sonar-web/node_modules' before_cache: - - 'find $HOME/.m2/repository -type d -name \*-SNAPSHOT -exec rm -rf {} \;' - - 'find $HOME/.m2/repository -name maven-metadata-\* -exec rm {} \;' - - 'find $HOME/.m2/repository -name resolver-status.properties -exec rm {} \;' # remove all the artifacts (JAR, ZIP) that are installed in local repo because of mvn deploy - rm -rf $HOME/.m2/repository/org/sonarsource/sonarqube @@ -12,7 +12,7 @@ case "$RUN_ACTIVITY" in ;; run-it-released-plugins) - ./run-integration-tests.sh "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties" "Plugins" + ./run-integration-tests.sh "Plugins" "http://infra.internal.sonarsource.com/jenkins/orch-h2.properties" ;; run-perf-tests) diff --git a/quick-build.sh b/quick-build.sh index 7a7f3a83e55..d75343f5c28 100755 --- a/quick-build.sh +++ b/quick-build.sh @@ -38,7 +38,5 @@ echo '' echo '' echo '' -# Parallel executions of maven modules and tests. -# Half of CPU core are used in to keep other half for OS and other programs. ./stop.sh -mvn clean install -T0.5C -B -e -DskipTests=true -Pdev $* +mvn install -B -e -V -DskipTests=true -Dsource.skip=true -Denforcer.skip=true $* diff --git a/run-db-integration-tests.sh b/run-db-integration-tests.sh deleted file mode 100755 index b858cc263dc..00000000000 --- a/run-db-integration-tests.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -euo pipefail - -ORCHESTRATOR_CONFIG_URL=$1 -CATEGORY=$2 -shift 2 - -cd it -mvn verify \ - -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \ - -Dwith-db-drivers \ - -Dcategory=$CATEGORY \ - -Dsource.skip=true -B -e -V $* diff --git a/run-integration-tests.sh b/run-integration-tests.sh index ca90257796c..b3db6e6bab3 100755 --- a/run-integration-tests.sh +++ b/run-integration-tests.sh @@ -1,12 +1,23 @@ #!/bin/bash +# Run integration tests. SonarQube must be already built in order to +# make the ZIP file available for tests. + +# Arguments: +# 1. the category of tests. Possible values: "Category1", "Category2" ,"Category3", "Category4", "Category5" and "Plugins" +# 2. the path to Orchestrator properties file. If empty, then default values are used. Example: "file:///Users/me/orchestrator.properties" +# +# Examples: +# ./run-integration-tests.sh "Category1" "file:///Users/me/orchestrator-mysql56.properties" +# ./run-integration-tests.sh "Category1" "" + set -euo pipefail -ORCHESTRATOR_CONFIG_URL=$1 -CATEGORY=$2 +CATEGORY=$1 +ORCHESTRATOR_CONFIG_URL=$2 shift 2 cd it mvn verify \ - -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \ -Dcategory=$CATEGORY \ + -Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL \ -Dsource.skip=true -B -e -V $* diff --git a/server/sonar-server/pom.xml b/server/sonar-server/pom.xml index 8d66a8ab8bf..07da679c1d0 100644 --- a/server/sonar-server/pom.xml +++ b/server/sonar-server/pom.xml @@ -297,44 +297,4 @@ </plugins> </build> - <profiles> - <profile> - <!-- SonarSource internal use --> - <id>dbTests</id> - <activation> - <property> - <name>dbTests</name> - </property> - </activation> - <properties> - <junitGroups>org.sonar.test.DbTests</junitGroups> - </properties> - <dependencies> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - </dependency> - <dependency> - <groupId>org.postgresql</groupId> - <artifactId>postgresql</artifactId> - </dependency> - <dependency> - <!-- this artifact is located in the SonarSource internal repository --> - <groupId>com.oracle</groupId> - <artifactId>ojdbc6</artifactId> - <version>11.2.0.3.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.microsoft.sqljdbc</groupId> - <artifactId>sqljdbc41</artifactId> - <version>4.1</version> - <scope>system</scope> - <systemPath>${project.basedir}/../../sonar-application/src/main/assembly/lib/jdbc/mssql/sqljdbc41.jar</systemPath> - </dependency> - </dependencies> - </profile> - </profiles> - - </project> diff --git a/travis.sh b/travis.sh index e7b31f32762..e670bc14f95 100755 --- a/travis.sh +++ b/travis.sh @@ -66,7 +66,8 @@ WEB) IT) start_xvfb - mvn install -Pit,dev -DskipTests -Dcategory=$IT_CATEGORY -Dmaven.test.redirectTestOutputToFile=false -B -V -e -Dsource.skip=true + ./quick-build.sh + ./run-integration-tests.sh "$IT_CATEGORY" "" ;; *) |