summaryrefslogtreecommitdiffstats
path: root/test/Win32
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/Win32
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/Win32')
-rw-r--r--test/Win32/mingw.py5
-rw-r--r--test/Win32/win32pathmadness.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/test/Win32/mingw.py b/test/Win32/mingw.py
index 3385422..6b23314 100644
--- a/test/Win32/mingw.py
+++ b/test/Win32/mingw.py
@@ -63,7 +63,7 @@ env=Environment(tools=['mingw'])
assert env['CC'] == 'gcc'
env.StaticLibrary('static', 'static.cpp')
env.SharedLibrary('shared', 'shared.cpp')
-env.SharedLibrary('cshared', ['cshared.c', 'cshared.def'])
+env.SharedLibrary('cshared', ['cshared.c', 'cshared.def'], WINDOWS_INSERT_DEF=1)
env.Program('test', ['test.cpp', env.RES('resource.rc', CPPPATH=['header'])], LIBS=['static', 'shared', 'cshared'], LIBPATH=['.'])
""")
@@ -151,7 +151,8 @@ test.run(arguments='test.exe', stderr='.*')
test.fail_test(test.stdout().find('cshared.def') == -1)
test.fail_test(test.stdout().find('-Wl,--output-def,cshared.def') != -1)
# ensure the target def got generated for the shared.dll:
-test.fail_test(not os.path.exists(test.workpath('shared.def')))
+test.fail_test(not os.path.exists(test.workpath('cshared.def')))
+test.fail_test(os.path.exists(test.workpath('shared.def')))
test.run(program=test.workpath('test.exe'), stdout='test.cpp\nshared.cpp\nstatic.cpp\ncshared.c\n2001 resource.rc\n')
# ensure that modifying the header causes the resource to be rebuilt:
diff --git a/test/Win32/win32pathmadness.py b/test/Win32/win32pathmadness.py
index dd04ec4..fe6373d 100644
--- a/test/Win32/win32pathmadness.py
+++ b/test/Win32/win32pathmadness.py
@@ -41,6 +41,11 @@ if sys.platform != 'win32':
msg = "Skipping Windows path tests on non-Windows platform '%s'\n" % sys.platform
test.skip_test(msg)
+import SCons.Tool.MSCommon as msc
+if not msc.msvc_exists():
+ msg = "No MSVC toolchain found...skipping test'\n"
+ test.skip_test(msg)
+
test.subdir('src', 'build', 'include', 'src2')
test.write('src/SConstruct', """