diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-08-31 15:33:53 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-08-31 15:33:53 +1000 |
commit | 5d4bcaa20375657afa7c59826e02fd738a6750e1 (patch) | |
tree | 11331db2c59fc77852f9ec35da9bb43df45725e9 /build.sbt | |
parent | 5e91aa563dca2ea6b2aba2b767994c06a0fb2a61 (diff) | |
download | scala-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.sbt | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) |