File tree 4 files changed +26
-14
lines changed
src/sbt-test/scoverage/aggregate
4 files changed +26
-14
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
The projects test aggregation of coverage reports from two sub-projects.
3
- The sub-projects are in the irectories partA and partB.
4
- The tests are against the sources of ScoverageSbtPlugin in the parent directory.
5
- It might be possible to test other versions of ScoverageSbtPlugin.
3
+ The sub-projects are in the directories partA and partB.
6
4
*/
7
5
8
6
lazy val commonSettings = Seq (
@@ -35,6 +33,3 @@ lazy val root = (project in file("."))
35
33
partA,
36
34
partB
37
35
)
38
-
39
-
40
-
Original file line number Diff line number Diff line change 1
- /*
2
- * ScoveragePlugin is constructed from the sources in the parent directory
3
- */
4
- lazy val root = (project in file(" ." )).dependsOn(scoveragePlugin)
1
+ // The Typesafe repository
2
+ resolvers += " Typesafe repository" at " http://repo.typesafe.com/typesafe/releases/"
3
+
4
+ // scoverage needs this
5
+ resolvers += Classpaths .sbtPluginReleases
6
+
7
+ {
8
+ val pluginVersion = System .getProperty(" plugin.version" )
9
+ if (pluginVersion == null )
10
+ throw new RuntimeException (""" |The system property 'plugin.version' is not defined.
11
+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin)
12
+ else addSbtPlugin(" org.scoverage" %% " sbt-scoverage" % pluginVersion)
13
+ }
14
+
5
15
6
- lazy val scoveragePlugin = file(" ../../../.." ).getAbsoluteFile.toURI
Original file line number Diff line number Diff line change 1
- #this file is necessary for scripted plugin. See http://eed3si9n.com/testing-sbt-plugins
2
- #it is empty for now
1
+ # run scoverage using the coverage task
2
+ > clean
3
+ > coverage
4
+ > test
5
+ # There should be scoverage-data directory
6
+ $ exists partA/target/scala-2.10/scoverage-data
7
+ $ exists partB/target/scala-2.10/scoverage-data
8
+ > coverageAggregate
9
+ # There should be scoverage-data directory
10
+ $ exists target/scala-2.10/scoverage-report
Original file line number Diff line number Diff line change 1
- version in ThisBuild := " 1.3.3 "
1
+ version in ThisBuild := " 1.3.4 "
You can’t perform that action at this time.
0 commit comments