mirror of https://github.com/sbt/sbt.git
Mark passing pending scripted tests as failures
This commit is contained in:
parent
ca1de3836e
commit
1b2750be7a
|
|
@ -81,6 +81,7 @@ final class ScriptedTests(resourceBaseDirectory: File, bufferLog: Boolean, launc
|
|||
prescripted(testDirectory)
|
||||
runTest()
|
||||
buffered.info("+ " + label + pendingString)
|
||||
if (pending) throw new PendingTestSuccessException(label)
|
||||
} catch {
|
||||
case e: xsbt.test.TestException =>
|
||||
testFailed()
|
||||
|
|
@ -89,6 +90,9 @@ final class ScriptedTests(resourceBaseDirectory: File, bufferLog: Boolean, launc
|
|||
case _ => e.printStackTrace
|
||||
}
|
||||
if (!pending) throw e
|
||||
case e: PendingTestSuccessException =>
|
||||
testFailed()
|
||||
throw e
|
||||
case e: Exception =>
|
||||
testFailed()
|
||||
if (!pending) throw e
|
||||
|
|
@ -209,3 +213,7 @@ object CompatibilityLevel extends Enumeration {
|
|||
case Minimal28 => "2.8.1"
|
||||
}
|
||||
}
|
||||
class PendingTestSuccessException(label: String) extends Exception {
|
||||
override def getMessage: String =
|
||||
s"The pending test $label succeeded. Mark this test as passing to remove this failure."
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue