mirror of https://github.com/sbt/sbt.git
Run pre hook only after checking disabled tests
This commit is contained in:
parent
0ee3585b6d
commit
210dcde822
|
|
@ -140,17 +140,17 @@ final class ScriptedTests(resourceBaseDirectory: File,
|
||||||
// Copy test's contents and reload the sbt instance to pick them up
|
// Copy test's contents and reload the sbt instance to pick them up
|
||||||
IO.copyDirectory(originalDir, tempTestDir)
|
IO.copyDirectory(originalDir, tempTestDir)
|
||||||
|
|
||||||
// Reload and initialize (to reload contents of .sbtrc files)
|
val runTest = () => {
|
||||||
val sbtHandler = handlers.getOrElse('>', sys.error("Missing sbt handler."))
|
// Reload and initialize (to reload contents of .sbtrc files)
|
||||||
val statement =
|
val sbtHandler = handlers.getOrElse('>', sys.error("Missing sbt handler."))
|
||||||
Statement(";reload;initialize", Nil, successExpected = true, line = -1)
|
val statement =
|
||||||
runner.processStatement(sbtHandler.asInstanceOf[SbtHandler], statement, states)
|
Statement(";reload;initialize", Nil, successExpected = true, line = -1)
|
||||||
|
runner.processStatement(sbtHandler.asInstanceOf[SbtHandler], statement, states)
|
||||||
|
commonRunTest(label, tempTestDir, preHook, handlers, runner, states, buffer)
|
||||||
|
}
|
||||||
|
|
||||||
val runTest =
|
// Run the test and delete files (except global that holds local scala jars)
|
||||||
() => commonRunTest(label, tempTestDir, preHook, handlers, runner, states, buffer)
|
|
||||||
val result = runOrHandleDisabled(label, tempTestDir, runTest, buffer)
|
val result = runOrHandleDisabled(label, tempTestDir, runTest, buffer)
|
||||||
|
|
||||||
// Delete test's files and clear buffer if successful
|
|
||||||
IO.delete(tempTestDir.*("*" -- "global").get)
|
IO.delete(tempTestDir.*("*" -- "global").get)
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue