Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
3fd64658
Commit
3fd64658
authored
Sep 01, 2013
by
Mikhail Glushenkov
Browse files
Merge pull request #1459 from Blaisorblade/topic/testsuite-failures
Test suite: canonicalize binary path before execution
parents
ba7d2f1f
86800bbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cabal/tests/PackageTests/PackageTester.hs
View file @
3fd64658
...
...
@@ -176,8 +176,10 @@ cabal spec cabalArgs ghcPath = do
run
::
Maybe
FilePath
->
String
->
[
String
]
->
IO
(
String
,
ExitCode
,
String
)
run
cwd
path
args
=
do
verbosity
<-
getVerbosity
-- path is relative to the current directory; canonicalizePath makes it
-- absolute, so that runProcess will find it even when changing directory.
path'
<-
do
pathExists
<-
doesFileExist
path
return
(
if
pathExists
then
path
else
path
<.>
exeExtension
)
canonicalizePath
(
if
pathExists
then
path
else
path
<.>
exeExtension
)
printRawCommandAndArgs
verbosity
path'
args
(
readh
,
writeh
)
<-
createPipe
pid
<-
runProcess
path'
args
cwd
Nothing
Nothing
(
Just
writeh
)
(
Just
writeh
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment