Commit 14729d69 authored by ttuegel's avatar ttuegel
Browse files

Restore graceful failure upon invoking "cabal test" before "cabal build".

parent 0cc02535
......@@ -183,6 +183,11 @@ testController flags pkg_descr lbi suite preTest cmd postTest logNamer = do
bracket (openCabalTemp testLogDir) deleteIfExists $ \tempLog ->
bracket (openCabalTemp testLogDir) deleteIfExists $ \tempInput -> do
-- Check that the test executable exists.
exists <- doesFileExist cmd
unless exists $ die $ "Error: Could not find test program \"" ++ cmd
++ "\". Did you build the package first?"
-- Remove old .tix files if appropriate.
unless (fromFlag $ testKeepTix flags) $ do
let tDir = tixDir distPref $ PD.testName suite
Markdown is supported
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