Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,252
Issues
4,252
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
397
Merge Requests
397
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
753d59c1
Commit
753d59c1
authored
May 01, 2012
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change how we detect whether the terminal is cygwin or msys
sys.platform now always returns 'win32' for me.
parent
b4d34d4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
testsuite/driver/runtests.py
testsuite/driver/runtests.py
+9
-9
No files found.
testsuite/driver/runtests.py
View file @
753d59c1
...
...
@@ -18,11 +18,6 @@ from testglobals import *
# value.
os
.
environ
[
'TERM'
]
=
'vt100'
if
sys
.
platform
==
"cygwin"
:
cygwin
=
True
else
:
cygwin
=
False
global
config
config
=
getConfig
()
# get it from testglobals
...
...
@@ -115,15 +110,20 @@ if config.use_threads == 1:
config
.
cygwin
=
False
config
.
msys
=
False
if
windows
:
if
cygwin
:
h
=
os
.
popen
(
'uname -s'
,
'r'
)
v
=
h
.
read
()
h
.
close
()
if
v
.
startswith
(
"CYGWIN"
):
config
.
cygwin
=
True
el
se
:
el
if
v
.
startswith
(
"MINGW32"
)
:
config
.
msys
=
True
else
:
raise
Exception
(
"Can't detect Windows terminal type"
)
# Try to use UTF8
if
windows
:
import
ctypes
if
cygwin
:
if
c
onfig
.
c
ygwin
:
# Is this actually right? Which calling convention does it use?
# As of the time of writing, ctypes.windll doesn't exist in the
# cygwin python, anyway.
...
...
@@ -182,7 +182,7 @@ if windows or darwin:
path
=
re
.
sub
(
'^"(.*)"$'
,
'
\\
1'
,
path
)
path
=
re
.
sub
(
'
\\\\
(.)'
,
'
\\
1'
,
path
)
if
windows
:
if
cygwin
:
if
c
onfig
.
c
ygwin
:
# On cygwin we can't put "c:\foo" in $PATH, as : is a
# field separator. So convert to /cygdrive/c/foo instead.
# Other pythons use ; as the separator, so no problem.
...
...
Write
Preview
Markdown
is supported
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