From b7a8e9f9e6869b2fe6439d6823b9202e7dee9caf Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 20 Dec 2024 18:19:36 +0200 Subject: [PATCH] More graceful failure --- cabal.project | 2 ++ hs-bindgen/tests/TastyGolden.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cabal.project b/cabal.project index ce81b252..f5ef75c0 100644 --- a/cabal.project +++ b/cabal.project @@ -4,6 +4,8 @@ packages: hs-bindgen-libclang packages: hs-bindgen-bootstrap packages: ansi-diff +-- packages: /home/phadej/tree-diff + tests: True benchmarks: True diff --git a/hs-bindgen/tests/TastyGolden.hs b/hs-bindgen/tests/TastyGolden.hs index b4a75e42..7e83228b 100644 --- a/hs-bindgen/tests/TastyGolden.hs +++ b/hs-bindgen/tests/TastyGolden.hs @@ -79,6 +79,8 @@ runGoldenSteps (GoldenSteps getGolden getTested cmp update) progress opts = do mbNew <- try $ getTested stepFn msgs <- readIORef msgsRef <&> reverse + print $ either (const 'x') (const 'y') mbNew + case mbNew of Left e | Just _ <- fromException @AsyncException e -> throwIO e