forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
15b5b05
commit a1d60e6
Showing
2 changed files
with
9 additions
and
26 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
cabal-testsuite/PackageTests/AutogenModulesToggling/cabal.out
This file was deleted.
Oops, something went wrong.
13 changes: 9 additions & 4 deletions
13
cabal-testsuite/PackageTests/AutogenModulesToggling/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main :: IO () | ||
main = cabalTest . recordMode RecordMarked $ do | ||
skipUnlessGhcVersion ">= 9.7" | ||
cabal "v2-run" ["-fgenerate", "autogen-toggle-test"] | ||
cabal "v2-run" ["-f-generate", "autogen-toggle-test"] | ||
main = setupTest . recordMode DoNotRecord . withPackageDb $ do | ||
-- This test exposes a recompilation bug in ghc versions 9.0.2 and 9.2.8 | ||
skipIfGhcVersion "== 9.0.2 || == 9.2.8" | ||
setup_install ["-fgenerate"] | ||
r1 <- runInstalledExe' "autogen-toggle-test" [] | ||
setup_install ["-f-generate"] | ||
r2 <- runInstalledExe' "autogen-toggle-test" [] | ||
assertOutputContains "Real module, ship to production" r1 | ||
assertOutputContains "Prebuilt module, don't use in production" r2 |