Skip to content
Snippets Groups Projects
Unverified Commit 394b2415 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Merge pull request #9407 from mpickering/wip/autogen-modules-test

Fix AutogenModulesToggling test
parents 398a9bf4 9d3a7c72
No related branches found
No related tags found
No related merge requests found
# cabal v2-run
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- test-0.1 (exe:autogen-toggle-test) (first run)
Configuring test-0.1...
Preprocessing library for test-0.1...
Building library for test-0.1...
Preprocessing executable 'autogen-toggle-test' for test-0.1...
Building executable 'autogen-toggle-test' for test-0.1...
The module says: Real module, ship to production
# cabal v2-run
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- test-0.1 (exe:autogen-toggle-test) (configuration changed)
Configuring test-0.1...
Preprocessing library for test-0.1...
Building library for test-0.1...
Preprocessing executable 'autogen-toggle-test' for test-0.1...
Building executable 'autogen-toggle-test' for test-0.1...
The module says: Prebuilt module, don't use in production
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 || < 8.0 "
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment