test-sandbox 0.0.1.3 → 0.0.1.4
raw patch · 3 files changed
+13/−2 lines, 3 files
Files
- src/Test/Sandbox.hs +1/−0
- src/Test/Sandbox/Internals.hs +10/−0
- test-sandbox.cabal +2/−2
src/Test/Sandbox.hs view
@@ -156,6 +156,7 @@ start :: String -- ^ Process name -> Sandbox () start process = uninterruptibleMask_ $ do+ installSignalHandlers displayBanner sp <- getProcess process whenM isVerbose $ liftIO $ putStr ("Starting process " ++ process ++ "... ") >> hFlush stdout
src/Test/Sandbox/Internals.hs view
@@ -392,6 +392,16 @@ void $ setVariable var True where var = "__BANNER__DISPLAYED__" +installSignalHandlers :: Sandbox ()+installSignalHandlers = do+ installed <- checkVariable var+ unless installed $ liftIO . void $ do installHandler sigTERM handler Nothing+ installHandler sigQUIT handler Nothing+ installHandler sigABRT handler Nothing+ void $ setVariable var True+ where var = "__HANDLERS_INSTALLED__"+ handler = Catch $ signalProcess sigINT =<< getProcessID+ -- Structures to store Sandbox options for future use. -- Not expected to be used directly by the user.
test-sandbox.cabal view
@@ -1,5 +1,5 @@ Name: test-sandbox-Version: 0.0.1.3+Version: 0.0.1.4 Cabal-Version: >= 1.14 Category: Testing Synopsis: Sandbox for system tests@@ -25,7 +25,7 @@ Source-Repository this Type: git Location: https://github.com/gree/haskell-test-sandbox- Tag: 0.0.1.3+ Tag: test-sandbox_0.0.1.4 Library Exposed-modules: Test.Sandbox