Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
828901dc
Commit
828901dc
authored
Jul 09, 2007
by
Ian Lynagh
Browse files
reqlib now uses subprocess (when it's available)
Fixes a problem where /dev/null doesn't exist on mingw.
parent
4d49c9fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/driver/testlib.py
View file @
828901dc
...
...
@@ -83,7 +83,17 @@ def reqlib( lib ):
def
_reqlib
(
opts
,
lib
):
# opts.reqlibs.append(lib)
r
=
os
.
system
(
config
.
ghc_pkg
+
' describe '
+
lib
+
' > /dev/null 2> /dev/null'
)
if
have_subprocess
:
# By preference we use subprocess, as the alternative uses /dev/null
# which mingw doesn't have.
p
=
subprocess
.
Popen
([
config
.
ghc_pkg
,
'describe'
,
lib
],
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
# read from stdout and stderr to avoid blocking due to buffers filling
p
.
communicate
()
r
=
p
.
wait
()
else
:
r
=
os
.
system
(
config
.
ghc_pkg
+
' describe '
+
lib
+
' > /dev/null 2> /dev/null'
)
if
r
!=
0
:
opts
.
expect
=
'fail'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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