diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-03-02 15:05:13 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-03-04 16:30:43 +0100 |
commit | cb0dad7bd0791b2f5dede1528f7c775441fbad8b (patch) | |
tree | baf2e147b258fc48b33bb1fa3ad79e09ad80421c | |
parent | cd0327a0683bd6330af1aa013ed98f9db55a4685 (diff) | |
download | sonarqube-cb0dad7bd0791b2f5dede1528f7c775441fbad8b.tar.gz sonarqube-cb0dad7bd0791b2f5dede1528f7c775441fbad8b.zip |
it-plugins - enforce analysis of C/C++ project without build-wrapper
-rw-r--r-- | it/it-tests/src/test/java/it/plugins/PluginsTest.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/it/it-tests/src/test/java/it/plugins/PluginsTest.java b/it/it-tests/src/test/java/it/plugins/PluginsTest.java index 3b9fc61316e..f70aadf8f4e 100644 --- a/it/it-tests/src/test/java/it/plugins/PluginsTest.java +++ b/it/it-tests/src/test/java/it/plugins/PluginsTest.java @@ -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; } |