cleaner test dependencies

This improves the display of tests.

tasty-1.2 is in debian stable.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-03-16 12:53:08 -04:00
parent d3b7c6705c
commit be31a8a3d2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 14 additions and 18 deletions

View file

@ -457,19 +457,12 @@ testMode opts v = TestMode
hasUnlockedFiles :: TestMode -> Bool
hasUnlockedFiles m = unlockedFiles m || adjustedUnlockedBranch m
withTestMode :: TestMode -> Maybe TestTree -> TestTree -> TestTree
withTestMode testmode minittests = withResource prepare release . const
withTestMode :: TestMode -> TestTree -> TestTree
withTestMode testmode = withResource prepare release . const
where
prepare = do
setTestMode testmode
setmainrepodir =<< newmainrepodir
case minittests of
Just inittests ->
case tryIngredients [consoleTestReporter] mempty inittests of
Nothing -> error "No tests found!?"
Just act -> unlessM act $
error "init tests failed! cannot continue"
Nothing -> return ()
release _ = noop
setTestMode :: TestMode -> IO ()