summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-08-31 15:33:53 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-08-31 15:33:53 +1000
commit5d4bcaa20375657afa7c59826e02fd738a6750e1 (patch)
tree11331db2c59fc77852f9ec35da9bb43df45725e9 /build.sbt
parent5e91aa563dca2ea6b2aba2b767994c06a0fb2a61 (diff)
downloadscala-5d4bcaa20375657afa7c59826e02fd738a6750e1.tar.gz
scala-5d4bcaa20375657afa7c59826e02fd738a6750e1.tar.bz2
scala-5d4bcaa20375657afa7c59826e02fd738a6750e1.zip
Workaround sbt bug when partest itself throws
Discussion: https://github.com/sbt/sbt/issues/2722 This commit checks that some test events exist in the test log for `test/it:test` before trusting the result of `Success`.
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt12
1 files changed, 11 insertions, 1 deletions
diff --git a/build.sbt b/build.sbt
index b2a27bcc6f..c5dce18b84 100644
--- a/build.sbt
+++ b/build.sbt
@@ -675,7 +675,17 @@ lazy val test = project
def isModule = true
def annotationName = "partest"
}, true, Array()
- )
+ ),
+ executeTests in IntegrationTest := {
+ val result = (executeTests in IntegrationTest).value
+ if (result.overall != TestResult.Error && result.events.isEmpty) {
+ // workaround for https://github.com/sbt/sbt/issues/2722
+ val result = (executeTests in Test).value
+ (streams.value.log.error("No test events found"))
+ result.copy(overall = TestResult.Error)
+ }
+ else result
+ }
)
lazy val manual = configureAsSubproject(project)