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.
testsuite: Add test for haskell#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
- Loading branch information
1 parent
21b858f
commit 1031865
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{- cabal: | ||
build-depends: base | ||
-} | ||
|
||
main = print $ 1 + 1 |
7 changes: 7 additions & 0 deletions
7
cabal-testsuite/PackageTests/NewBuild/CmdRun/RunProf/cabal.out
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# cabal v2-run | ||
Resolving dependencies... | ||
Build profile: -w ghc-<GHCVER> -O1 | ||
In order, the following will be built: | ||
- fake-package-0 (exe:script-Main.hs) --enable-profiling (first run) | ||
Configuring executable 'script-Main.hs' for fake-package-0... | ||
Building executable 'script-Main.hs' for fake-package-0... |
5 changes: 5 additions & 0 deletions
5
cabal-testsuite/PackageTests/NewBuild/CmdRun/RunProf/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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
res <- cabal' "v2-run" ["--enable-profiling", "./Main.hs"] | ||
assertOutputContains "2" res |