on master help sign in
#564, fix JUnit tests (#799)

* Make the ScenarioService take an IO callback, not STM * Remove a redundant space * Use IO in preference to STM where we really don't care which is in use * #564, always print out diagnostics for tests * #564, fix getting the scenario names so if they can't be computed you give an answer * Add a proper data type to represent pass/fail in the tests * Centrailse printing a failure message * Pull the test execution into a separate file, ensuring it always gives back an exit code * Use nubOrd instead of Set * Clean up how we figure out which files to test * Fail if there are any errors * Delete all the brittle failure tracking stuff * Rename the compiler handle to h * Only print out the successful results to stdout, since the unsuccessful ones end up in diagnostics * Make JUnit output still print out the test results * Make JUnit print out all the details * Delete the stdio command path * Break the bigger pieces apart in the test runner * Inline testJUnit * Shorten to UseColor * Shorten to color * Inline and comment part of the JUnit tests * HLint * Update daml-foundations/daml-tools/da-hs-daml-cli/DA/Cli/Damlc/Test.hs Co-Authored-By: neil-da <35463327+neil-da@users.noreply.github.com> * Fix an HLint refactoring snafu * Fix up the damlc tests * Tighten up a test by demanding it throws ExitFailure

commit70524321ad76d70540a24f955d49d1551e6bd42a authorNeil Mitchell <35463327+neil-da@users.noreply.github.com> dateTue 30 Apr 2019, 19:07 (7 years ago) parent5b4cfbb
1 file changed+3−3
src/Development/IDE/State/Service.hs+3−3
src/Development/IDE/State/Service.hs+3−3
@@ -20,11 +20,11 @@ module Development.IDE.State.Service(
2020 ) where
2121
2222import Control.Concurrent.Extra
23−import Control.Concurrent.STM
2423import Control.Monad.Except
2524import Development.IDE.Functions.Compile (CompileOpts(..))
2625import Development.IDE.State.FileStore
2726import qualified Development.IDE.Logger as Logger
27+import Data.Maybe
2828import Data.Set (Set)
2929import qualified Data.Set as Set
3030import qualified Data.Text as T
@@ -71,13 +71,13 @@ unsafeClearDiagnostics = unsafeClearAllDiagnostics
7171
7272-- | Initialise the Compiler Service.
7373initialise :: Rules ()
74− -> Maybe (Event -> STM ())
74+ -> Maybe (Event -> IO ())
7575 -> Logger.Handle IO
7676 -> CompileOpts
7777 -> IO IdeState
7878initialise mainRule toDiags logger options =
7979 shakeOpen
80− (maybe (const $ pure ()) (atomically .) toDiags)
80+ (fromMaybe (const $ pure ()) toDiags)
8181 logger
8282 (setProfiling options $
8383 shakeOptions { shakeThreads = optThreads options