From 46b5b59eae490ff19c8e0edbac35031d1773899b Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 11 Feb 2016 10:25:12 +0100 Subject: [PATCH] Fix IT scripts --- .travis.yml | 3 --- cix.sh | 2 +- quick-build.sh | 4 +--- run-db-integration-tests.sh | 13 ------------ run-integration-tests.sh | 17 +++++++++++++--- server/sonar-server/pom.xml | 40 ------------------------------------- travis.sh | 3 ++- 7 files changed, 18 insertions(+), 64 deletions(-) delete mode 100755 run-db-integration-tests.sh 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 diff --git a/cix.sh b/cix.sh index b3586a872e1..dca3ef0ec90 100755 --- a/cix.sh +++ b/cix.sh @@ -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 @@ - - - - dbTests - - - dbTests - - - - org.sonar.test.DbTests - - - - mysql - mysql-connector-java - - - org.postgresql - postgresql - - - - com.oracle - ojdbc6 - 11.2.0.3.0 - test - - - com.microsoft.sqljdbc - sqljdbc41 - 4.1 - system - ${project.basedir}/../../sonar-application/src/main/assembly/lib/jdbc/mssql/sqljdbc41.jar - - - - - - 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" "" ;; *) -- 2.39.5