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 #542 from OpenCover/rc
Browse files Browse the repository at this point in the history
Build Release
  • Loading branch information
sawilde committed Feb 8, 2016
2 parents 9b37582 + 8baeb9a commit 3676427
Show file tree
Hide file tree
Showing 176 changed files with 8,857 additions and 2,728 deletions.
21 changes: 18 additions & 3 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 @@ -58,3 +58,18 @@ ReleaseNotes.txt
/fakes/**/FakesAssemblies/**/*
/fakes/packages
!fakes/packages/repositories.config

#Coverity
cov-int*
coverity.zip

#SharpDevelop
/**/OpenCover/coverage.xml

#sonarqube
/.sonarqube
!tools/sonarqube/**/*
!tools/CxxSonarQubeMsbuidRunner.exe
/main/.sonarqube
/main/.cxxresults
/tools/sonarqube/cxx-runner
6 changes: 5 additions & 1 deletion Build.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@echo off
build\nant-0.91-alpha2\bin\nant.exe -f:"%cd%"\default.build %1
build\nant-0.91-alpha2\bin\nant.exe -f:"%cd%"\default.build %1
@echo.
@echo %date%
@echo %time%
@echo.
60 changes: 36 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,62 @@
OpenCover is a code coverage tool for .NET 2 and above (Windows OSs only - no MONO), with support for 32 and 64 processes and covers both branch and sequence points. OpenCover was started after attempts to make PartCover support 64-bit processes got just a [little too complicated](http://blog.many-monkeys.com/open_cover_first_beta_release/).

The latest releases can be downloaded from [releases](https://github.com/opencover/opencover/releases) or from the OpenCover mirror site on [bitbucket](https://bitbucket.org/shaunwilde/opencover/downloads). **Alternatively** why not try the [nuget](http://nuget.org/packages/opencover) package (this is the most popular).

[![Build status](https://img.shields.io/appveyor/ci/sawilde/opencover.svg)](https://ci.appveyor.com/project/sawilde/opencover)
[![Coverage](https://img.shields.io/coveralls/OpenCover/opencover/master.svg)](https://coveralls.io/r/OpenCover/opencover)
[![Nuget](https://img.shields.io/nuget/dt/opencover.svg)](http://nuget.org/packages/opencover)
[![Nuget](https://img.shields.io/nuget/v/opencover.svg)](http://nuget.org/packages/opencover)
[![Nuget](https://img.shields.io/nuget/vpre/opencover.svg)](http://nuget.org/packages/opencover)
| Build | [![Build status](https://img.shields.io/appveyor/ci/sawilde/opencover.svg)](https://ci.appveyor.com/project/sawilde/opencover) |
| --- | --- |
| **Coverage** | [![Coverage](https://img.shields.io/coveralls/OpenCover/opencover/master.svg)](https://coveralls.io/r/OpenCover/opencover) [![Coverity](https://scan.coverity.com/projects/3921/badge.svg)](https://scan.coverity.com/projects/opencover-opencover) |
| **Nuget** | [![Nuget](https://img.shields.io/nuget/dt/opencover.svg)](http://nuget.org/packages/opencover) [![Nuget](https://img.shields.io/nuget/v/opencover.svg)](http://nuget.org/packages/opencover) [![Nuget](https://img.shields.io/nuget/vpre/opencover.svg)](http://nuget.org/packages/opencover) |
| **Lead Times** | [![Issue Stats](http://issuestats.com/github/opencover/opencover/badge/pr)](http://issuestats.com/github/opencover/opencover) [![Issue Stats](http://issuestats.com/github/opencover/opencover/badge/issue)](http://issuestats.com/github/opencover/opencover) |

[![Build History](https://ci-buildstats.azurewebsites.net/appveyor/chart/sawilde/opencover?branch=master&includeBuildsFromPullRequest=false)](https://ci.appveyor.com/project/sawilde/opencover)

### Master
The primary repo for the project is [on GitHub](https://github.com/opencover/opencover/) and is also where the [wiki](https://github.com/OpenCover/opencover/wiki) and [issues](https://github.com/OpenCover/opencover/wiki) are managed from.

### Team communication
[![Join the chat at https://gitter.im/OpenCover/opencover](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/OpenCover/opencover?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Team communications can also be done via [slack](http://slack.com), raise an issue to request access (include your email - obfuscated if you wish) and we will send you an invite then just visit the [team page](https://opencover.slack.com/) to sign up and join the conversation.
### WIKI
Please review the [wiki pages](https://github.com/opencover/opencover/wiki/_pages) on how to use OpenCover and take particular interest in the [Usage guide](https://github.com/opencover/opencover/wiki/Usage).

### Issues
Please raise issues on GitHub, if you can repeat the issue then please provide a sample to make it easier for us to also repeat it and then implement a fix. Please do not hijack unrelated issues, I would rather you create a new issue than add noise to an unrelated issue.

[Dropbox](http://db.tt/VanqFDn) is very useful for sharing files alternatively you could create a [gist](https://gist.github.com/).

### Licence
All Original Software is licensed under the [MIT Licence](https://github.com/opencover/opencover/blob/master/License.md) and does not apply to any other 3rd party tools, utilities or code which may be used to develop this application.

If anyone is aware of any licence violations that this code may be making please inform the developers so that the issue can be investigated and rectified.

### WIKI
Please review the [wiki pages](https://github.com/opencover/opencover/wiki/_pages) on how to use OpenCover and take particular interest in the [Usage guide](https://github.com/opencover/opencover/wiki/Usage).
### Integration Test support
OpenCover was initially created to support unit testing techniques such as TDD and tools like NUnit and MSTest. Over time others have found ways to use OpenCover for integration testing especially in tricky scenarios such as IIS and Windows Services. I'll put links here as to how people have achieved this however as they say YMMV (You Mileage May Vary).

### Service support
Note that .zip and .nuget packages (at least) will not ACL files so that a low-privilege service can execute them -- manually add the service principal with read/execute privilege to the OpenCover.Profiler.dll ACLs, either through explorer properties or by a `Get-Acl`/`Set-Acl` PowerShell script.
#### Mono support
It isn't, sorry - this tool uses the profiler API that is currently only available to .NET Frameworks running on the Windows platform.

Launching the profiling operation must be done with Administrator privilege -- this is required to even start the service, and is also needed to create the global objects and set the per-service environment that registers the COM object. Assuming that the COM objects have been pre-registered, the command line to use is like
#### IIS support
Please refer to the wiki - [IIS Support](https://github.com/OpenCover/opencover/wiki/IIS-Support)

OpenCover.console.exe -service:byname -target:<service name> -output:coverage.xml

As this is a blocking operation, launching the coverage gathering a separate process as
#### DNX support
Please refer to the wiki - [DNX Support](https://github.com/OpenCover/opencover/wiki/DNX-Support)

start-process OpenCover.console.exe @("-target:<service name>", "-service:byName", "-output:<service name>coverage.xml")

or equivalent in your test scripts.
#### Win8/Win10 Application Support
Not yet [implemented](https://github.com/OpenCover/opencover/issues/144). Sorry no call for it I assume the WPF way of separating model and UI has led to people getting all they need from unit-tests; I know how that is how it works for me.

The `byname` qualifier is used to prevent races if multiple services are being started concurrently by injecting the OpenCover profiling information to the service specific environment.

### Issues
Please raise issues on GitHub, if you can repeat the issue then please provide a sample to make it easier for us to also repeat it and then implement a fix. Please do not hijack unrelated issues, I would rather you create a new issue than add noise to an unrelated issue.
#### Service support
Please refer to the wiki - [Service Support](https://github.com/OpenCover/opencover/wiki/Service-Support)

[Dropbox](http://db.tt/VanqFDn) is very useful for sharing files alternatively you could create a [gist](https://gist.github.com/).
#### Silverlight support
Please refer to the wiki - [Silverlight support](https://github.com/OpenCover/opencover/wiki/Silverlight-Support)

### Building
You will need:

1. Visual Studio VS2013 (Community Edition) or later with C# and C++
2. WiX 3.9 or later (http://wix.codeplex.com/releases/view/136891)
3. Specflow (http://visualstudiogallery.msdn.microsoft.com/9915524d-7fb0-43c3-bb3c-a8a14fbd40ee)
3. SpecFlow (http://visualstudiogallery.msdn.microsoft.com/9915524d-7fb0-43c3-bb3c-a8a14fbd40ee)
4. Windows SDK 8 and .NET Framework Tools (https://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx)

All other software should be included with this repository.

Expand Down Expand Up @@ -83,10 +92,13 @@ No Git? Don't worry you can download the latest code as a [zip file](http://gith
I would like to thank

* JetBrains for my Open Source [ReSharper licence](http://www.jetbrains.com/resharper/),
<img src="http://www.jetbrains.com/company/docs/logo_jetbrains.png"/>

* [AppVeyor](https://ci.appveyor.com/project/sawilde/opencover) for allowing free build CI services for Open Source projects,
* [Coveralls](https://coveralls.io/r/OpenCover/opencover) for allowing free services for Open Source projects,
* NDepend for my [NDepend licence](http://www.ndepend.com/).
* NDepend for my [NDepend licence](http://www.ndepend.com/),
* the guys at [CodeBetter](http://codebetter.com/), [Devlicious](http://devlicio.us/) and [Los Techies](http://lostechies.com/) who orignally arranged my MSDN licence all those years ago without which I doubt I'd have been able to start OpenCover (now no longer needed as we can build OpenCover using the VS2013 Community Edition),
* the [NextGenUG](http://www.nxtgenug.net/) and their free swag from where I got lots of useful tools,


I'd also like to thank my family, employers, colleagues and friends for all their support.
15 changes: 15 additions & 0 deletions ReleaseNotes.tmp
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
Version [[version]]
#528 -safemode:on to address incomplete coverage due to thread based buffers (feature)
#521 add exclude paths (feature)
#376 protect buffer allocation in multithreaded environment (fix)
#335 allow short wait timeout to be configured (feature)
#310 improved reporting - hide branches due to iterators (feature)
#352 improved reporting - hide branches due to async (feature)
#363 calculate npath comlexity (feature)
#282 exclude by process (feature)
#246 auto crash reports (feature)
#329 address ArgumentOutOfRangeException (potentially related to #274) (fix for VS2015)
#335 error on unrecognized arguments/prefixes (fix)
#328 exclude types when declaredtype is excluded (fix-feature)
#302 ignore branches in known autogenerated sequences (feature)

Version 4.6.166
#323 push releases and candidates to github via appveyor (prj-mgmt)
#315 update nuget package (fix for VS2015)
#320 update packages (fix for VS2015)
Expand Down
28 changes: 24 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
version: 4.6.{build}
os: Unstable
skip_tags: true
os: Visual Studio 2015
shallow_clone: true
environment:
COVERALLS_REPO_TOKEN:
secure: BBBH4QgZXCnE6nFrux34cLWWO5GXrnMU9OZJGJdNePovxJZFzBcm3FsaESNA6zWj
secure: A5Y5pKzc8Xf2qOCrFqYP2BWQYKif/BtlesWT/uojWfOFJj5jcSOaHP+DfwVYid09
COVERITY_TOKEN:
secure: q4yqC+X51LwoyuBcg0qvks1117rt1HwqsDErKsbLpsQ=
COVERITY_EMAIL:
secure: lgy4M/uQ9jMlxmPzTIYWVE2GggvPntq6kfpO6Z0pjAs=
SONARQUBE_USER:
secure: +9YfPnwJzGsvdyto85pHwg==
SONARQUBE_PASSWORD:
secure: Ptvd9aDNKfVhXvPpq6o1Fw==
cache:
- build/Version/opencover.snk
- build/Version/opencover.public.snk
nuget:
disable_publish_on_pr: true
build_script:
- build create-release
- ps: >-
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True" -or $env:APPVEYOR_REPO_BRANCH -eq "coverity") {
& .\build.bat create-coverity-release
} else {
& .\build.bat create-release
}
test: off
artifacts:
- path: main/bin/installer/*.msi
Expand Down Expand Up @@ -60,4 +75,9 @@ notifications:
on_build_failure: true
on_build_status_changed: true
on_success:
- build dogfood-release
- ps: >-
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_SCHEDULED_BUILD -ne "True" -and $env:APPVEYOR_REPO_BRANCH -ne "coverity") {
& .\build.bat sonarqube-build
} else {
& .\build.bat dogfood-release
}
File renamed without changes.
19 changes: 19 additions & 0 deletions build/coverity/coverity_model.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Coverity Scan model
*
* This is a modeling file for Coverity Scan. Modeling helps to avoid false
* positives.
*
* - A model file can't import any header files.
* - Therefore only some built-in primitives like int, char and void are
* available but not wchar_t, NULL etc.
* - Modeling doesn't need full structs and typedefs. Rudimentary structs
* and similar types are sufficient.
* - An uninitialized local pointer is not an error. It signifies that the
* variable could be either NULL or have some data.
*
* Coverity Scan doesn't pick up modifications automatically. The model file
* must be uploaded by an admin in the analysis settings of
* http://scan.coverity.com/projects/3921
*/

/* empty modeling file for now */
1 change: 1 addition & 0 deletions build/installer.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<include name="Gendarme.Rules.Maintainability.dll" />
<include name="log4net.dll" />
<include name="log4net.config" />
<include name="CrashReporter.NET.dll" />
</fileset>
<fileset basedir="${solution.folder}\bin\Release\x86" prefix="x86">
<include name="OpenCover.Profiler.dll" />
Expand Down
Loading

0 comments on commit 3676427

Please sign in to comment.