File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
rules_haskell_tests/tests Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import IntegrationTesting
23
23
24
24
main :: IO ()
25
25
main = hspec $ do
26
- afterAll_ shutdownBazel $ do
26
+ afterAll_ shutdownBazel $ after_ printMemoryHook $ do
27
27
it " bazel test" $ do
28
28
assertSuccess (bazel [" test" , " //..." ])
29
29
@@ -179,6 +179,14 @@ shutdownBazel = do
179
179
printMemory " AFTER"
180
180
pure ()
181
181
182
+ -- | Print memory information before and after each test
183
+ printMemoryHook :: IO () -> IO ()
184
+ printMemoryHook action = bracket
185
+ (printMemory " BEFORE" )
186
+ (printMemory " AFTER" )
187
+ (const action)
188
+
189
+
182
190
-- | Print information about the current memory state to debug intermittent failures
183
191
-- Related to https://github.com/tweag/rules_haskell/issues/2089
184
192
printMemory :: String -> IO ()
You can’t perform that action at this time.
0 commit comments