]> source.dussan.org Git - sonarqube.git/commitdiff
Fix IT scripts
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 11 Feb 2016 09:25:12 +0000 (10:25 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 11 Feb 2016 09:51:58 +0000 (10:51 +0100)
.travis.yml
cix.sh
quick-build.sh
run-db-integration-tests.sh [deleted file]
run-integration-tests.sh
server/sonar-server/pom.xml
travis.sh

index 77f5cff748c9114efac16f6f5fca57906e20f4c9..69aa276a0162b12df743f4e1bb717456b7069bb2 100644 (file)
@@ -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 b3586a872e142d14b6a27f65f22887612989e465..dca3ef0ec905080c50ef153fdb46f830ca884c40 100755 (executable)
--- 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)
index 7a7f3a83e55ce7b485dcb8fa9ebcb168ef39977f..d75343f5c2878a7e05f3457ba6e9f2ee668180c1 100755 (executable)
@@ -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 (executable)
index b858cc2..0000000
+++ /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 $*
index ca90257796c43a508b3c8a4c0a9f3ceb765a5a74..b3db6e6bab380064106337aa289c6ddeb20948ce 100755 (executable)
@@ -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 $*
index 8d66a8ab8bf9c8e21fca79cba70f72c508f4b53a..07da679c1d09c36093e77e707fb991ebae222647 100644 (file)
     </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>
index e7b31f32762f9a325bce2aaec8d8ef32c27a6092..e670bc14f9516ccd975890015e43778d923f428a 100755 (executable)
--- 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" ""
   ;;
 
 *)