Commit 1ecf1801 authored by ttuegel's avatar ttuegel
Browse files

Fail gracefully when running "setup test" before "setup build".

parent a448e16c
......@@ -181,6 +181,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?"
-- Create directory for HPC files.
createDirectoryIfMissing True $ tixDir distPref 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