Closed StivLangton closed 9 years ago
"sonar.tests" property should contain comma separated relative paths to directories containing test sources. Your screenshot shows "Highway.build" file.
You can find all fields description on SonarQube wiki: http://docs.codehaus.org/display/SONAR/Analysis+Parameters
I defined in TC 8.1.4 a Sonar Build Step, configured the Sonar Server and on executing I get following error, As shown in the image the folder it cannot find actually exist in the directory What am I doing wrong? Any help will be greatly appreciated.
[12:33:16]Step 6/7: Static Code Analysis (SonarQube Runner) (10s) [12:33:16]Starting SQR [12:33:16]-DConfiguration=120 [12:33:16]-Dagent.home.dir=C:\BuildAgent [12:33:16]-Dagent.name=Build Agent - Two [12:33:16]-Dagent.work.dir=C:\BuildAgent\work [12:33:16]-Dbuild.number=120 [12:33:16]-Dbuild.vcs.number=2f524ea10d44 [12:33:16]-Dbuild.vcs.number.1=2f524ea10d44 [12:33:16]-Dbuild.vcs.number.Graphnet_1_HgFlow=2f524ea10d44 [12:33:16]-Djava.io.tmpdir=C:\BuildAgent\temp\buildTmp [12:33:16]-Dteamcity.agent.cpuBenchmark=486 [12:33:16]-Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 [12:33:16]-Dteamcity.agent.dotnet.build_id=133 [12:33:16]-Dteamcity.auth.password=ZNZa0Wh7olT9e3VRGNHzPg81KbdlHdS1 [12:33:16]-Dteamcity.auth.userId=TeamCityBuildId=133 [12:33:16]-Dteamcity.build.changedFiles.file=C:\BuildAgent\temp\buildTmp\changedFiles1334158162697001176.txt [12:33:16]-Dteamcity.build.checkoutDir=C:\BuildAgent\work\7f725ac6f688085 [12:33:16]-Dteamcity.build.properties.file=C:\BuildAgent\temp\buildTmp\teamcity.build1032307057240994632.properties [12:33:16]-Dteamcity.build.tempDir=C:\BuildAgent\temp\buildTmp [12:33:16]-Dteamcity.build.workingDir=C:\BuildAgent\work\7f725ac6f688085 [12:33:16]-Dteamcity.buildConfName=Highway [12:33:16]-Dteamcity.buildType.id=Graphnet_Highway [12:33:16]-Dteamcity.configuration.properties.file=C:\BuildAgent\temp\buildTmp\teamcity.config453626685440293262.properties [12:33:16]-Dteamcity.dotnet.nunitaddin=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit [12:33:16]-Dteamcity.dotnet.nunitlauncher=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe [12:33:16]-Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll [12:33:16]-Dteamcity.dotnet.nunitlauncher1.1=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe [12:33:16]-Dteamcity.dotnet.nunitlauncher2.0=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe [12:33:16]-Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe [12:33:16]-Dteamcity.dotnet.platform=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe [12:33:16]-Dteamcity.projectName=Graphnet [12:33:16]-Dteamcity.runner.properties.file=C:\BuildAgent\temp\buildTmp\teamcity.runner8727736764423825491.properties [12:33:16]-Dteamcity.tests.recentlyFailedTests.file=C:\BuildAgent\temp\buildTmp\testsToRunFirst5336246968575234311.txt [12:33:16]-Dteamcity.version=8.1.4 (build 30168) [12:33:16]-classpath [12:33:16]C:\BuildAgent\plugins\sonar-plugin-agent\sonar-qube-runner\lib\sonar-runner-dist-2.3.jar [12:33:16]org.sonar.runner.Main [12:33:16]-Dsonar.host.url=http://sonar.graphnethealth.com:9000/ [12:33:16]-Dsonar.jdbc.url=jdbc:jtds:sqlserver://gnet01/Sonar-CodeAnalysis [12:33:16]-Dsonar.jdbc.username=sonar [12:33:16]-Dsonar.jdbc.password=sonar [12:33:16]-Dsonar.projectKey=133 [12:33:16]-Dsonar.projectName=Highway [12:33:16]-Dsonar.projectVersion=120 [12:33:16]-Dsonar.sources=.src [12:33:16]-Dsonar.tests=Build/Highway.build [12:33:16]-Dsonar.password=password [12:33:16]-Dsonar.login=teamcity [12:33:16]Starting: "C:\Program Files\Java\jdk1.7.0_60\bin\java.exe" -DConfiguration=120 -Dagent.home.dir=C:\BuildAgent "-Dagent.name=Build Agent - Two " -Dagent.work.dir=C:\BuildAgent\work -Dbuild.number=120 -Dbuild.vcs.number=2f524ea10d44 -Dbuild.vcs.number.1=2f524ea10d44 -Dbuild.vcs.number.Graphnet_1_HgFlow=2f524ea10d44 -Djava.io.tmpdir=C:\BuildAgent\temp\buildTmp -Dteamcity.agent.cpuBenchmark=486 -Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 -Dteamcity.agent.dotnet.build_id=133 -Dteamcity.auth.password=ZNZa0Wh7olT9e3VRGNHzPg81KbdlHdS1 -Dteamcity.auth.userId=TeamCityBuildId=133 -Dteamcity.build.changedFiles.file=C:\BuildAgent\temp\buildTmp\changedFiles1334158162697001176.txt -Dteamcity.build.checkoutDir=C:\BuildAgent\work\7f725ac6f688085 -Dteamcity.build.properties.file=C:\BuildAgent\temp\buildTmp\teamcity.build1032307057240994632.properties -Dteamcity.build.tempDir=C:\BuildAgent\temp\buildTmp -Dteamcity.build.workingDir=C:\BuildAgent\work\7f725ac6f688085 -Dteamcity.buildConfName=Highway -Dteamcity.buildType.id=Graphnet_Highway -Dteamcity.configuration.properties.file=C:\BuildAgent\temp\buildTmp\teamcity.config453626685440293262.properties -Dteamcity.dotnet.nunitaddin=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Dteamcity.dotnet.nunitlauncher=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -Dteamcity.dotnet.nunitlauncher1.1=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Dteamcity.dotnet.nunitlauncher2.0=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -Dteamcity.dotnet.platform=C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe -Dteamcity.projectName=Graphnet -Dteamcity.runner.properties.file=C:\BuildAgent\temp\buildTmp\teamcity.runner8727736764423825491.properties -Dteamcity.tests.recentlyFailedTests.file=C:\BuildAgent\temp\buildTmp\testsToRunFirst5336246968575234311.txt "-Dteamcity.version=8.1.4 (build 30168)" -classpath C:\BuildAgent\plugins\sonar-plugin-agent\sonar-qube-runner\lib\sonar-runner-dist-2.3.jar org.sonar.runner.Main -Dsonar.host.url=http://sonar.graphnethealth.com:9000/ -Dsonar.jdbc.url=jdbc:jtds:sqlserver://gnet01/Sonar-CodeAnalysis -Dsonar.jdbc.username=sonar -Dsonar.jdbc.password=sonar -Dsonar.projectKey=133 -Dsonar.projectName=Highway -Dsonar.projectVersion=120 -Dsonar.sources=.src -Dsonar.tests=Build/Highway.build -Dsonar.password=password -Dsonar.login=teamcity [12:33:16]in directory: C:\BuildAgent\work\7f725ac6f688085 [12:33:17]SonarQube Runner 2.3 [12:33:17]Java 1.7.0_60 Oracle Corporation (64-bit) [12:33:17]Windows 7 6.1 amd64 [12:33:17]INFO: Runner configuration file: NONE [12:33:17]INFO: Project configuration file: NONE [12:33:17]INFO: Default locale: "en_GB", source code encoding: "windows-1252" (analysis is platform dependent) [12:33:17]INFO: Work directory: C:\BuildAgent\work\7f725ac6f688085..sonar [12:33:17]INFO: SonarQube Server 4.4 [12:33:18]12:33:18.860 INFO - Load global settings [12:33:19]12:33:19.672 INFO - User cache: C:.sonar\cache [12:33:19]12:33:19.690 INFO - Install plugins [12:33:20]12:33:20.021 INFO - Install JDBC driver [12:33:20]12:33:20.032 INFO - Create JDBC datasource for jdbc:jtds:sqlserver://gnet01/Sonar-CodeAnalysis [12:33:20]12:33:20.218 INFO - Initializing Hibernate [12:33:27]12:33:27.082 ERROR - Invalid value of sonar.tests for 133 [12:33:27]INFO: ------------------------------------------------------------------------ [12:33:27]INFO: EXECUTION FAILURE [12:33:27]INFO: ------------------------------------------------------------------------ [12:33:27]Total time: 9.869s [12:33:27]Final Memory: 8M/31M [12:33:27]INFO: ------------------------------------------------------------------------ [12:33:27]ERROR: Error during Sonar runner execution [12:33:27]ERROR: Unable to execute Sonar [12:33:27]ERROR: Caused by: The folder 'Build/Highway.build' does not exist for '133' (base directory = C:\BuildAgent\work\7f725ac6f688085.) [12:33:27]ERROR: [12:33:27]ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch. [12:33:27]ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging. [12:33:27]Process exited with code 1