From 38d8b26a2aafe04e478e91e46511cd37e55ea47b Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Thu, 27 Aug 2015 14:09:23 +0200 Subject: [PATCH] Run ITs with SQ 5.2/5.1.2/LTS --- .travis.yml | 2 ++ .../java/com/sonar/runner/it/CacheTest.java | 6 ++++++ .../java/com/sonar/runner/it/JavaTest.java | 2 +- travis.sh | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 41efeed..7dc0f7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ script: ./travis.sh env: - TESTS=CI - TESTS=IT-DEV + - TESTS=IT-DEV-SQ51 + - TESTS=IT-DEV-LTS matrix: fast_finish: true diff --git a/it/src/test/java/com/sonar/runner/it/CacheTest.java b/it/src/test/java/com/sonar/runner/it/CacheTest.java index df6186f..1b2f6ca 100644 --- a/it/src/test/java/com/sonar/runner/it/CacheTest.java +++ b/it/src/test/java/com/sonar/runner/it/CacheTest.java @@ -19,6 +19,8 @@ */ package com.sonar.runner.it; +import org.junit.Assume; + import org.junit.BeforeClass; import org.junit.rules.TemporaryFolder; import org.junit.Rule; @@ -64,6 +66,8 @@ public class CacheTest extends RunnerTestCase { @Test public void testIssuesMode() throws IOException { + Assume.assumeTrue(orchestrator.getServer().version().isGreaterThanOrEquals("5.2")); + // online, without cache -> should sync ensureStarted(); SonarRunner build = createRunner("issues", true); @@ -87,6 +91,8 @@ public class CacheTest extends RunnerTestCase { @Test public void testPublishModeOffline() throws IOException { + Assume.assumeTrue(orchestrator.getServer().version().isGreaterThanOrEquals("5.2")); + // online (cache not used) ensureStarted(); SonarRunner build = createRunner("publish"); diff --git a/it/src/test/java/com/sonar/runner/it/JavaTest.java b/it/src/test/java/com/sonar/runner/it/JavaTest.java index f5ec9e0..2e82c64 100644 --- a/it/src/test/java/com/sonar/runner/it/JavaTest.java +++ b/it/src/test/java/com/sonar/runner/it/JavaTest.java @@ -53,7 +53,7 @@ public class JavaTest extends RunnerTestCase { SonarRunner build = newRunner(new File("projects/java-sample")) .setProperty("sonar.verbose", "true") - .addArguments("-e", "-X"); + .addArguments("-e"); // SONARPLUGINS-3061 // Add a trailing slash build.setProperty("sonar.host.url", orchestrator.getServer().getUrl() + "/"); diff --git a/travis.sh b/travis.sh index 4299683..a3bb399 100755 --- a/travis.sh +++ b/travis.sh @@ -29,4 +29,22 @@ IT-DEV) mvn -DsonarRunner.version="2.5-SNAPSHOT" -Dsonar.runtimeVersion="DEV" -Dmaven.test.redirectTestOutputToFile=false install ;; +IT-DEV-SQ51) + installTravisTools + + mvn install -Dsource.skip=true -Denforcer.skip=true -Danimal.sniffer.skip=true -Dmaven.test.skip=true + + cd it + mvn -DsonarRunner.version="2.5-SNAPSHOT" -Dsonar.runtimeVersion="5.1.2" -Dmaven.test.redirectTestOutputToFile=false install + ;; + +IT-DEV-LTS) + installTravisTools + + mvn install -Dsource.skip=true -Denforcer.skip=true -Danimal.sniffer.skip=true -Dmaven.test.skip=true + + cd it + mvn -DsonarRunner.version="2.5-SNAPSHOT" -Dsonar.runtimeVersion="4.5.5" -Dmaven.test.redirectTestOutputToFile=false install + ;; + esac -- 2.39.5