]> source.dussan.org Git - sonarqube.git/commitdiff
it-plugins - enforce analysis of C/C++ project without build-wrapper
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 2 Mar 2016 14:05:13 +0000 (15:05 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 4 Mar 2016 15:30:43 +0000 (16:30 +0100)
it/it-tests/src/test/java/it/plugins/PluginsTest.java

index 3b9fc61316e771e6e7baa7de5c2d26e66f828852..f70aadf8f4e38a15c87559a9870dbfffcc0035e4 100644 (file)
@@ -24,7 +24,7 @@ import com.google.common.collect.Sets;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.OrchestratorBuilder;
 import com.sonar.orchestrator.build.BuildResult;
-import com.sonar.orchestrator.build.SonarRunner;
+import com.sonar.orchestrator.build.SonarScanner;
 import it.plugins.checks.AbapCheck;
 import it.plugins.checks.CCheck;
 import it.plugins.checks.Check;
@@ -111,7 +111,7 @@ public class PluginsTest {
 
   @Test
   public void analysis_of_project_with_all_supported_languages() {
-    SonarRunner analysis = newAnalysis();
+    SonarScanner analysis = newAnalysis();
     BuildResult result = orchestrator.executeBuildQuietly(analysis);
     if (result.getStatus() != 0) {
       fail(result.getLogs());
@@ -124,7 +124,7 @@ public class PluginsTest {
 
   @Test
   public void preview_analysis_of_project_with_all_supported_languages() {
-    SonarRunner analysis = newAnalysis();
+    SonarScanner analysis = newAnalysis();
     analysis.setProperty("sonar.analysis.mode", "issues");
     analysis.setProperty("sonar.preview.excludePlugins", Joiner.on(",").join(DISABLED_PLUGINS_FOR_PREVIEW_MODE));
     BuildResult result = orchestrator.executeBuildQuietly(analysis);
@@ -133,9 +133,12 @@ public class PluginsTest {
     }
   }
 
-  private static SonarRunner newAnalysis() {
-    SonarRunner analysis = SonarRunner.create(Project.basedir());
+  private static SonarScanner newAnalysis() {
+    SonarScanner analysis = SonarScanner.create(Project.basedir());
     analysis.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-XX:MaxPermSize=128m");
+
+    // required to bypass usage of build-wrapper
+    analysis.setProperties("sonar.cfamily.build-wrapper-output.bypass", "true");
     return analysis;
   }