Browse Source

SQSCANNER-117 Analyzing cfamily projects with embedded JRE fails with 'Permission denied'

pull/153/head
Duarte Meneses 8 months ago
parent
commit
d6a72faa1d

+ 3
- 0
it/projects/simple-js/file.js View File

@@ -0,0 +1,3 @@
function msg(){
alert("Hello JS");
}

+ 14
- 0
it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java View File

@@ -52,6 +52,20 @@ public class ScannerTest extends ScannerTestCase {
.isGreaterThan(1);
}

/**
* SQSCANNER-117
*/
@Test
public void analyzers_can_spawn_processes() {
SonarScanner build = newScanner(new File("projects/simple-js"))
.useNative()
.setProjectKey("SAMPLE");
orchestrator.executeBuild(build);
Map<String, Measure> projectMeasures = getMeasures("SAMPLE", "files", "ncloc");
assertThat(parseInt(projectMeasures.get("files").getValue())).isEqualTo(1);
assertThat(parseInt(projectMeasures.get("ncloc").getValue())).isGreaterThan(1);
}

/**
* Replace the maven format groupId:artifactId by a single key
*/

+ 5
- 5
it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java View File

@@ -36,13 +36,13 @@ public class SonarScannerTestSuite {

private static Orchestrator createOrchestrator() {
String sonarVersion = System
.getProperty("sonar.runtimeVersion", "LATEST_RELEASE[7.9]");
.getProperty("sonar.runtimeVersion", "LATEST_RELEASE[9.9]");
return Orchestrator.builderEnv()
.useDefaultAdminCredentialsForBuilds(true)
.setSonarVersion(
sonarVersion).addPlugin(MavenLocation
.of("org.sonarsource.sonarqube", "sonar-xoo-plugin",
sonarVersion)).build();
.setSonarVersion(sonarVersion)
.keepBundledPlugins()
.addPlugin(MavenLocation.of("org.sonarsource.sonarqube", "sonar-xoo-plugin", sonarVersion))
.build();
}

}

Loading…
Cancel
Save