File tree Expand file tree Collapse file tree 9 files changed +68
-2
lines changed
Cabal/src/Distribution/Simple/Test
cabal-testsuite/PackageTests/TestChangeDir Expand file tree Collapse file tree 9 files changed +68
-2
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,17 @@ runTest pkg_descr lbi clbi hpcMarkupInfo flags suite = do
125125 -- drain the output.
126126 evaluate (force logText)
127127
128+ let mbWorkDir =
129+ interpretSymbolicPathCWD
130+ <$> flagToMaybe (setupWorkingDir (testCommonFlags flags))
131+
128132 (exit, logText) <- case testWrapper flags of
129133 Flag path ->
130134 rawSystemIOWithEnvAndAction
131135 verbosity
132136 path
133137 (cmd : opts)
134- Nothing
138+ mbWorkDir
135139 (Just shellEnv')
136140 getLogText
137141 -- these handles are automatically closed
@@ -143,7 +147,7 @@ runTest pkg_descr lbi clbi hpcMarkupInfo flags suite = do
143147 verbosity
144148 cmd
145149 opts
146- Nothing
150+ mbWorkDir
147151 (Just shellEnv')
148152 getLogText
149153 -- these handles are automatically closed
Original file line number Diff line number Diff line change 1+ packages : regression-simple
2+
3+ tests : True
Original file line number Diff line number Diff line change 1+ import Test.Cabal.Prelude
2+
3+ main = cabalTest . recordMode DoNotRecord $ do
4+ -- Building a target that contains whitespace
5+ cabal " test" [" regression-simple" ]
6+ cabal " bench" [" regression-simple" ]
Original file line number Diff line number Diff line change 1+ # Revision history for regression-simple
2+
3+ ## 0.1.0.0 -- YYYY-mm-dd
4+
5+ * First version. Released on an unsuspecting world.
Original file line number Diff line number Diff line change 1+ module Main (main ) where
2+
3+ main :: IO ()
4+ main = readFile " do-i-exist.txt" >>= print
Original file line number Diff line number Diff line change 1+ I exist
Original file line number Diff line number Diff line change 1+ cabal-version : 3.14
2+ name : regression-simple
3+ version : 0.1.0.0
4+ license : NONE
5+ author : Matthew Pickering
6+ 7+ build-type : Simple
8+ extra-doc-files : CHANGELOG.md
9+
10+ common warnings
11+ ghc-options : -Wall
12+
13+ test-suite regression-simple-test
14+ import : warnings
15+ default-language : Haskell2010
16+ type : exitcode-stdio-1.0
17+ hs-source-dirs : test
18+ main-is : Main.hs
19+ build-depends : base
20+
21+ benchmark regression-simple-bench
22+ import : warnings
23+ default-language : Haskell2010
24+ type : exitcode-stdio-1.0
25+ hs-source-dirs : bench
26+ main-is : Main.hs
27+ build-depends : base
Original file line number Diff line number Diff line change 1+ module Main (main ) where
2+
3+ main :: IO ()
4+ main = readFile " do-i-exist.txt" >>= print
Original file line number Diff line number Diff line change 1+ synopsis: Honour the `-working-dir` flag when executing testsuite executables.
2+ packages: Cabal
3+ prs: #10725
4+ issues: #10704
5+ significance:
6+
7+ description: {
8+
9+ Honour the `-working-dir` flag when executing testsuite executables. This fixes a
10+ regression in Cabal-3.14.0.0.
11+
12+ }
You can’t perform that action at this time.
0 commit comments