Skip to content

Commit a1d60e6

Browse files
committed
Fix AutogenModulesToggling test
By converting this to a setupTest we use the in-tree Cabal library rather than relying on a proxy of the GHC version to provide the right Cabal library version. Supersedes haskell#9398
1 parent 15b5b05 commit a1d60e6

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

cabal-testsuite/PackageTests/AutogenModulesToggling/cabal.out

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import Test.Cabal.Prelude
22

33
main :: IO ()
4-
main = cabalTest . recordMode RecordMarked $ do
5-
skipUnlessGhcVersion ">= 9.7"
6-
cabal "v2-run" ["-fgenerate", "autogen-toggle-test"]
7-
cabal "v2-run" ["-f-generate", "autogen-toggle-test"]
4+
main = setupTest . recordMode DoNotRecord . withPackageDb $ do
5+
-- This test exposes a recompilation bug in ghc versions 9.0.2 and 9.2.8
6+
skipIfGhcVersion "== 9.0.2 || == 9.2.8"
7+
setup_install ["-fgenerate"]
8+
r1 <- runInstalledExe' "autogen-toggle-test" []
9+
setup_install ["-f-generate"]
10+
r2 <- runInstalledExe' "autogen-toggle-test" []
11+
assertOutputContains "Real module, ship to production" r1
12+
assertOutputContains "Prebuilt module, don't use in production" r2

0 commit comments

Comments
 (0)