Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #535 from OpenCover/master
Browse files Browse the repository at this point in the history
create a release-candidate
  • Loading branch information
sawilde committed Feb 1, 2016
2 parents 196a957 + a7a270a commit 0f35bfa
Show file tree
Hide file tree
Showing 53 changed files with 1,576 additions and 1,292 deletions.
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
/main/**/Debug
/main/**/Release
/main/**/*.user
/main/OpenCover.opensdf
/main/OpenCover.sdf
/main/OpenCover.suo
/main/**/*.opensdf
/main/**/*.sdf
/main/**/*.suo
/main/Docs
/main/OpenCover.Profiler/OpenCoverProfiler_i.h
/main/OpenCover.Profiler/OpenCoverProfiler_i.c
Expand Down Expand Up @@ -69,4 +69,7 @@ coverity.zip
#sonarqube
/.sonarqube
!tools/sonarqube/**/*
/main/OpenCover.SonarQube.sdf
!tools/CxxSonarQubeMsbuidRunner.exe
/main/.sonarqube
/main/.cxxresults
/tools/sonarqube/cxx-runner
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ os: Visual Studio 2015
shallow_clone: true
environment:
COVERALLS_REPO_TOKEN:
secure: BBBH4QgZXCnE6nFrux34cLWWO5GXrnMU9OZJGJdNePovxJZFzBcm3FsaESNA6zWj
secure: A5Y5pKzc8Xf2qOCrFqYP2BWQYKif/BtlesWT/uojWfOFJj5jcSOaHP+DfwVYid09
COVERITY_TOKEN:
secure: rw3Pk+YPWTG7xG7AaJx8wpxnYAOXM1/7HTRahQGuCHc=
secure: q4yqC+X51LwoyuBcg0qvks1117rt1HwqsDErKsbLpsQ=
COVERITY_EMAIL:
secure: lgy4M/uQ9jMlxmPzTIYWVE2GggvPntq6kfpO6Z0pjAs=
SONARQUBE_USER:
secure: +9YfPnwJzGsvdyto85pHwg==
SONARQUBE_PASSWORD:
secure: bGKR0fiOKZo/cNuigVxuUw==
secure: Ptvd9aDNKfVhXvPpq6o1Fw==
cache:
- build/Version/opencover.snk
- build/Version/opencover.public.snk
Expand Down
53 changes: 38 additions & 15 deletions default.build
Original file line number Diff line number Diff line change
Expand Up @@ -84,35 +84,58 @@

</target>

<target name="sonarqube-build" if="${environment::variable-exists('SONARQUBE_USER')}">

<call target="dogfood-release" />

<target name="sonarqube-build-ci" if="${environment::variable-exists('SONARQUBE_USER')}">
<property name="sonarqube.user" value="${environment::get-variable('SONARQUBE_USER')}" />
<property name="sonarqube.pwd" value="${environment::get-variable('SONARQUBE_PASSWORD')}" />

<xmlpoke file="tools\sonarqube\SonarQube.Analysis.xml" xpath="//m:Property[@Name='sonar.login']" value="${sonarqube.user}">
<xmlpoke file="tools\sonarqube\runner\SonarQube.Analysis.xml" xpath="//m:Property[@Name='sonar.login']" value="${sonarqube.user}">
<namespaces>
<namespace prefix="m" uri="http://www.sonarsource.com/msbuild/integration/2015/1" />
</namespaces>
</xmlpoke>

<xmlpoke file="tools\sonarqube\SonarQube.Analysis.xml" xpath="//m:Property[@Name='sonar.password']" value="${sonarqube.pwd}">
<xmlpoke file="tools\sonarqube\runner\SonarQube.Analysis.xml" xpath="//m:Property[@Name='sonar.password']" value="${sonarqube.pwd}">
<namespaces>
<namespace prefix="m" uri="http://www.sonarsource.com/msbuild/integration/2015/1" />
</namespaces>
</xmlpoke>

<!-- assumes coverage file has been created -->
<exec program="tools\sonarqube\MSBuild.SonarQube.Runner.exe" commandline='begin /k:"opencover" /n:"opencover" /v:"${ci.fullBuildNumber}" /d:sonar.cs.opencover.reportsPaths="${root.folder}\main\bin\release\opencovertests.xml"' />

<exec program="${msbuild.exe}">
<arg value="${solution.folder}/opencover.sonarqube.sln" />
<arg value="/t:Rebuild" />
<arg value="/p:Configuration=release,Platform=x86" />
<xmlpoke file="tools\sonarqube\runner\SonarQube.Analysis.xml" xpath="//m:Property[@Name='sonar.host.url']" value="http://sonar.many-monkeys.com:9000">
<namespaces>
<namespace prefix="m" uri="http://www.sonarsource.com/msbuild/integration/2015/1" />
</namespaces>
</xmlpoke>

</target>

<target name="reset-private-vars" >

<setenv name="SONARQUBE_USER" value="" />
<setenv name="SONARQUBE_PASSWORD" value="" />

<setenv name="COVERITY_TOKEN" value="" />
<setenv name="COVERALLS_REPO_TOKEN" value="" />

</target>

<target name="sonarqube-build" if="${environment::variable-exists('SONARQUBE_USER')}">

<call target="sonarqube-build-ci" />

<call target="dogfood-release" />

<call target="reset-private-vars" />

<exec program="${tools.folder}/7-Zip/7za.exe" unless="${directory::exists('tools\sonarqube\cxx-runner')}">
<arg value="x" />
<arg value="-otools\sonarqube\cxx-runner" />
<arg value="tools\CxxSonarQubeMsbuidRunner.zip" />
</exec>

<exec program="tools\sonarqube\MSBuild.SonarQube.Runner.exe" commandline='end' />

<copy file="tools\CxxSonarQubeMsbuidRunner.exe" tofile="tools\sonarqube\cxx-runner\CxxSonarQubeMsbuidRunner.exe" />

<!-- assumes coverage file has been created -->
<exec program="tools\sonarqube\cxx-runner\CxxSonarQubeMsbuidRunner.exe" commandline='/m:main\opencover.sln /x:vs13 /q:tools\sonarqube\runner\MSBuild.SonarQube.Runner.exe /n:opencover /k:opencover /p:Configuration=release,Platform=x64,GtestRunnerTaskEnabled=false /v:"${ci.fullBuildNumber}" /d:sonar.cs.opencover.reportsPaths="${root.folder}\main\bin\release\opencovertests.xml"' />

</target>

Expand Down
1 change: 1 addition & 0 deletions main/.nuget/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<package id="Mono.pdb2mdb" version="0.1.0.20130128" />
<package id="NUnit.Runners" version="2.6.4" />
<package id="ReportGenerator" version="2.1.8.0" />
<package id="Sonar-Runner" version="1.4.0" />
<package id="xunit.runners" version="1.9.2" />
</packages>
14 changes: 12 additions & 2 deletions main/OpenCover.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,25 @@ from @class in module.Classes.Where(c => !c.ShouldSerializeSkippedDueTo())

private static bool GetFullOutputFile(CommandLineParser parser, out string outputFile)
{
outputFile = Path.Combine(Environment.CurrentDirectory, Environment.ExpandEnvironmentVariables(parser.OutputFile));
if (!Directory.Exists(Path.GetDirectoryName(outputFile)))
try
{
outputFile = Path.Combine(Environment.CurrentDirectory, Environment.ExpandEnvironmentVariables(parser.OutputFile));
}
catch (Exception ex)
{
outputFile = null;
System.Console.WriteLine("Invalid `outputFile` supplied: {0}", ex.Message);
return false;
}
if (!Directory.Exists(Path.GetDirectoryName(outputFile) ?? string.Empty))
{
System.Console.WriteLine("Output folder does not exist; please create it and make sure appropriate permissions are set.");
return false;
}
return true;
}


private static IFilter BuildFilter(CommandLineParser parser)
{
var filter = Filter.BuildFilter(parser);
Expand Down
Binary file modified main/OpenCover.Documentation/Usage.pdf
Binary file not shown.
Loading

0 comments on commit 0f35bfa

Please sign in to comment.