summaryrefslogtreecommitdiffstats
path: root/test/Win32
diff options
context:
space:
mode:
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', """