Commit 9a3cd918 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Cleanup between setup and cabal tests



TODO: This seems to cause Windows failure

Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 326da71c
......@@ -152,16 +152,19 @@ unexpectedSuccessExitCode :: Int
unexpectedSuccessExitCode = 66
setupAndCabalTest :: TestM () -> IO ()
setupAndCabalTest m = runTestM $ do
env <- getTestEnv
have_cabal <- isAvailableProgram cabalProgram
skipIf (testSkipSetupTests env && not have_cabal)
when (not (testSkipSetupTests env)) $ do
liftIO $ putStrLn "Test with Setup:"
m
when have_cabal $ do
liftIO $ putStrLn "Test with cabal-install:"
withReaderT (\nenv -> nenv { testCabalInstallAsSetup = True }) m
setupAndCabalTest m = do
runTestM $ do
env <- getTestEnv
have_cabal <- isAvailableProgram cabalProgram
skipIf (testSkipSetupTests env && not have_cabal)
when (not (testSkipSetupTests env)) $ do
liftIO $ putStrLn "Test with Setup:"
m
runTestM $ do
have_cabal <- isAvailableProgram cabalProgram
when have_cabal $ do
liftIO $ putStrLn "Test with cabal-install:"
withReaderT (\nenv -> nenv { testCabalInstallAsSetup = True }) m
setupTest :: TestM () -> IO ()
setupTest m = runTestM $ do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment