Skip to content

Commit

Permalink
Programming exercises: Improve test build logs for Haskell exercises (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
b-fein authored Nov 24, 2024
1 parent bcaf561 commit 9efdb06
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/resources/templates/haskell/test/test/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import qualified Interface as Sub
import qualified Solution as Sol

import Test.Tasty
import Test.Tasty.Runners.AntXML
import Test.Tasty.Ingredients (composeReporters)
import Test.Tasty.Ingredients.Basic (consoleTestReporter)
import Test.Tasty.Runners.AntXML
import Test.SmallCheck.Series as SCS
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
Expand Down Expand Up @@ -69,12 +71,12 @@ main = do
testRunner $ localOption timeoutOption tests
where
resultsPath = "test-reports/results.xml"
#ifdef PROD
-- on the server (production mode), run tests with xml output
testRunner = defaultMainWithIngredients [antXMLRunner]
#ifdef PROD
-- on the server (production mode), run tests with additional xml output
testRunner = defaultMainWithIngredients [composeReporters antXMLRunner consoleTestReporter]
#else
-- locally, run tests with terminal output
testRunner = defaultMain
#endif
#endif
-- by default, run for 1 second
timeoutOption = mkTimeout (1 * 10^6)

0 comments on commit 9efdb06

Please sign in to comment.