summaryrefslogtreecommitdiff
path: root/test/CC
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2012-12-18 21:27:01 +0100
committerDirk Baechle <dl9obn@darc.de>2012-12-18 21:27:01 +0100
commit6cede4390b5abb1424e9b79f159cb9567f28bd9c (patch)
tree572754fc81a9a5239eee054407aa455ca8de5af4 /test/CC
parent84d3d7f420f14bf33bea7f4cfc583118731da93f (diff)
downloadscons-6cede4390b5abb1424e9b79f159cb9567f28bd9c.tar.gz
- fixes for MinGW under Windows, mainly skipping MSVS-specific tests
Diffstat (limited to 'test/CC')
-rw-r--r--test/CC/CC.py2
-rw-r--r--test/CC/CCFLAGS.py14
-rw-r--r--test/CC/CFLAGS.py13
3 files changed, 20 insertions, 9 deletions
diff --git a/test/CC/CC.py b/test/CC/CC.py
index dd93674e..73dc4e6f 100644
--- a/test/CC/CC.py
+++ b/test/CC/CC.py
@@ -69,7 +69,7 @@ while args:
args = args[2:]
continue
args = args[1:]
- if a[0] != '/':
+ if not a[0] in '-/':
if not inf:
inf = a
continue
diff --git a/test/CC/CCFLAGS.py b/test/CC/CCFLAGS.py
index e273bfd7..069b4294 100644
--- a/test/CC/CCFLAGS.py
+++ b/test/CC/CCFLAGS.py
@@ -27,12 +27,18 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
import TestSCons
+_obj = TestSCons._obj
+
if sys.platform == 'win32':
- _obj = '.obj'
- fooflags = '/nologo -DFOO'
- barflags = '/nologo -DBAR'
+ import SCons.Tool.MSCommon as msc
+
+ if not msc.msvc_exists():
+ fooflags = '-DFOO'
+ barflags = '-DBAR'
+ else:
+ fooflags = '/nologo -DFOO'
+ barflags = '/nologo -DBAR'
else:
- _obj = '.o'
fooflags = '-DFOO'
barflags = '-DBAR'
diff --git a/test/CC/CFLAGS.py b/test/CC/CFLAGS.py
index d5efa1a3..6ea87adb 100644
--- a/test/CC/CFLAGS.py
+++ b/test/CC/CFLAGS.py
@@ -41,14 +41,19 @@ test.run(arguments = '.')
test.must_not_contain_any_line(test.stdout(), ["-xyz"])
test.must_contain_all_lines(test.stdout(), ["-abc"])
+_obj = TestSCons._obj
# Test passing CFLAGS to C compiler by actually compiling programs
if sys.platform == 'win32':
- _obj = '.obj'
- fooflags = '/nologo -DFOO'
- barflags = '/nologo -DBAR'
+ import SCons.Tool.MSCommon as msc
+
+ if not msc.msvc_exists():
+ fooflags = '-DFOO'
+ barflags = '-DBAR'
+ else:
+ fooflags = '/nologo -DFOO'
+ barflags = '/nologo -DBAR'
else:
- _obj = '.o'
fooflags = '-DFOO'
barflags = '-DBAR'