From 9efdb064d7f3cf04c36cc10bdfbb4a3f7af2a0a8 Mon Sep 17 00:00:00 2001 From: Benedikt Fein Date: Sun, 24 Nov 2024 19:51:11 +0100 Subject: [PATCH] Programming exercises: Improve test build logs for Haskell exercises (#9792) --- .../resources/templates/haskell/test/test/Test.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/resources/templates/haskell/test/test/Test.hs b/src/main/resources/templates/haskell/test/test/Test.hs index 024ec6008dfd..3f1ec81468e8 100644 --- a/src/main/resources/templates/haskell/test/test/Test.hs +++ b/src/main/resources/templates/haskell/test/test/Test.hs @@ -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 @@ -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)