Fail when the forked test harness fails

Fixes #2442/#2722
This commit is contained in:
Eugene Yokota 2016-08-31 04:16:43 -04:00 committed by Dale Wijnand
parent 84cb5e3a86
commit 254c615f36
3 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,7 @@
package sbt
import scala.collection.mutable
import scala.util.control.NonFatal
import testing._
import java.net.ServerSocket
import java.io._
@ -73,6 +74,8 @@ private[sbt] object ForkTests {
os.flush()
new React(is, os, log, opts.testListeners, resultsAcc).react()
} catch {
case NonFatal(e) => resultsAcc("Forked test harness failed: " + e.getMessage) = SuiteResult.Error
} finally {
is.close(); os.close(); socket.close()
}

View File

@ -0,0 +1,8 @@
### Bug fixes
- Fixes forked test succeeding when the test harness fails. [#2442][2442]/[#2730][2730] by [@eed3si9n][@eed3si9n]/[@dwijnand][@dwijnand}
[2442]: https://github.com/sbt/sbt/issues/2442
[2730]: https://github.com/sbt/sbt/pull/2730
[@eed3si9n]: https://github.com/eed3si9n
[@dwijnand]: https://github.com/dwijnand