File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
rules_haskell_tests/tests Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -183,11 +183,16 @@ buildAndTest path = describe path $ afterAll_ (shutdownBazel path) $ do
183
183
-- * Print Memory Hooks
184
184
185
185
-- | Print memory information before and after each test
186
+ -- Only perform the hook if RHT_PRINT_MEMORY is "true".
186
187
printMemoryHook :: IO () -> IO ()
187
- printMemoryHook action = bracket_
188
- (printMemory " === BEFORE ===" )
189
- (printMemory " === AFTER ===" )
190
- action
188
+ printMemoryHook action = do
189
+ rhtPrintMem <- lookupEnv " RHT_PRINT_MEMORY"
190
+ case rhtPrintMem of
191
+ Just " true" -> bracket_
192
+ (printMemory " === BEFORE ===" )
193
+ (printMemory " === AFTER ===" )
194
+ action
195
+ _ -> action
191
196
192
197
-- | Print information about the current memory state to debug intermittent failures
193
198
-- Related to https://github.com/tweag/rules_haskell/issues/2089
You can’t perform that action at this time.
0 commit comments