Skip to content

proper test coverageAggregate #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/sbt-test/scoverage/aggregate/build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*
The projects test aggregation of coverage reports from two sub-projects.
The sub-projects are in the irectories partA and partB.
The tests are against the sources of ScoverageSbtPlugin in the parent directory.
It might be possible to test other versions of ScoverageSbtPlugin.
The sub-projects are in the directories partA and partB.
*/

lazy val commonSettings = Seq(
Expand Down Expand Up @@ -35,6 +33,3 @@ lazy val root = (project in file("."))
partA,
partB
)



19 changes: 14 additions & 5 deletions src/sbt-test/scoverage/aggregate/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
/*
* ScoveragePlugin is constructed from the sources in the parent directory
*/
lazy val root = (project in file(".")).dependsOn(scoveragePlugin)
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

//scoverage needs this
resolvers += Classpaths.sbtPluginReleases

{
val pluginVersion = System.getProperty("plugin.version")
if(pluginVersion == null)
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
else addSbtPlugin("org.scoverage" %% "sbt-scoverage" % pluginVersion)
}


lazy val scoveragePlugin = file("../../../..").getAbsoluteFile.toURI
12 changes: 10 additions & 2 deletions src/sbt-test/scoverage/aggregate/test
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
#this file is necessary for scripted plugin. See http://eed3si9n.com/testing-sbt-plugins
#it is empty for now
# run scoverage using the coverage task
> clean
> coverage
> test
# There should be scoverage-data directory
$ exists partA/target/scala-2.10/scoverage-data
$ exists partB/target/scala-2.10/scoverage-data
> coverageAggregate
# There should be scoverage-data directory
$ exists target/scala-2.10/scoverage-report
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "1.3.3"
version in ThisBuild := "1.3.4"