summaryrefslogtreecommitdiffstats
path: root/test/LINK
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2012-12-18 20:27:01 (GMT)
committerDirk Baechle <dl9obn@darc.de>2012-12-18 20:27:01 (GMT)
commit66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f (patch)
tree572754fc81a9a5239eee054407aa455ca8de5af4 /test/LINK
parent02cae725ed116ae6cd996fe3bf5888f7f8f61b97 (diff)
downloadSCons-66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f.zip
SCons-66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f.tar.gz
SCons-66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f.tar.bz2
- fixes for MinGW under Windows, mainly skipping MSVS-specific tests
Diffstat (limited to 'test/LINK')
-rw-r--r--test/LINK/SHLINKCOMSTR.py37
1 files changed, 19 insertions, 18 deletions
diff --git a/test/LINK/SHLINKCOMSTR.py b/test/LINK/SHLINKCOMSTR.py
index f97040a..de56c2c 100644
--- a/test/LINK/SHLINKCOMSTR.py
+++ b/test/LINK/SHLINKCOMSTR.py
@@ -29,6 +29,7 @@ Test that the $SHLINKCOMSTR construction variable allows you to customize
the displayed linker string for programs using shared libraries.
"""
+import sys
import TestSCons
_python_ = TestSCons._python_
@@ -90,24 +91,24 @@ Linking shared test3.dll from test1.obj test2.obj
test.must_match('test3.dll', "test1.c\ntest2.c\n")
-
-# Now test an actual compile and link. Since MS Windows
-# resets the link actions, this could fail even if the above
-# test passed.
-test.write('SConstruct', """
-env = Environment(CXXCOMSTR = 'Compiling $TARGET ...',
- SHLINKCOMSTR = 'Shared-Linking $TARGET ...')
-env.SharedLibrary('test', 'test.cpp')
-""")
-test.write('test.cpp', """
-int i;
-""")
-
-test.run()
-if ("Shared-Linking" not in test.stdout()):
- test.fail_test()
-
-
+if sys.platform == "win32":
+ import SCons.Tool.MSCommon as msc
+ if msc.msvc_exists():
+ # Now test an actual compile and link. Since MS Windows
+ # resets the link actions, this could fail even if the above
+ # test passed.
+ test.write('SConstruct', """
+ env = Environment(CXXCOMSTR = 'Compiling $TARGET ...',
+ SHLINKCOMSTR = 'Shared-Linking $TARGET ...')
+ env.SharedLibrary('test', 'test.cpp')
+ """)
+ test.write('test.cpp', """
+ int i;
+ """)
+
+ test.run()
+ if ("Shared-Linking" not in test.stdout()):
+ test.fail_test()
test.pass_test()