Skip to content

Commit f661f0c

Browse files
committed
testsuite: Add test for #9334
This adds a test which checks that v2-run works with profiling. ``` cabal v2-run --enable-profiling Main.hs ``` which is the same one as is run in ghcup-ci. This test fails on recent GHC versions on GHCUp CI so hopefully also on cabal CI. https://github.com/haskell/ghcup-metadata/actions/runs/6369779959/job/17290326630#step:3:15214
1 parent 840ee99 commit f661f0c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# cabal v2-run
2+
Resolving dependencies...
3+
Build profile: -w ghc-<GHCVER> -O1
4+
In order, the following will be built:
5+
- fake-package-0 (exe:script-main.hs) --enable-profiling (first run)
6+
Configuring executable 'script-main.hs' for fake-package-0...
7+
Building executable 'script-main.hs' for fake-package-0...
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Test.Cabal.Prelude
2+
3+
main = cabalTest $ do
4+
res <- cabal' "v2-run" ["--enable-profiling", "./main.hs"]
5+
assertOutputContains "2" res
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{- cabal:
2+
build-depends: base
3+
-}
4+
5+
main = print $ 1 + 1

0 commit comments

Comments
 (0)