diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2012-07-22 22:50:33 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2012-07-22 22:50:33 (GMT) |
commit | 0374344b82df9df8f624c90cd7a7303c81deabf1 (patch) | |
tree | 7411e229d862609f8cf7b0748ef4afdf67905522 /test/LINK | |
parent | 61d780c8a77a884b5efd6ed6ceaa43fdc3f1b52b (diff) | |
download | SCons-0374344b82df9df8f624c90cd7a7303c81deabf1.zip SCons-0374344b82df9df8f624c90cd7a7303c81deabf1.tar.gz SCons-0374344b82df9df8f624c90cd7a7303c81deabf1.tar.bz2 |
Fix issue 2833 (LINKCOMSTR etc. on Windows).
Diffstat (limited to 'test/LINK')
-rw-r--r-- | test/LINK/LINKCOMSTR.py | 14 | ||||
-rw-r--r-- | test/LINK/SHLINKCOMSTR.py | 16 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/LINK/LINKCOMSTR.py b/test/LINK/LINKCOMSTR.py index 113bdcd..8fd8adc 100644 --- a/test/LINK/LINKCOMSTR.py +++ b/test/LINK/LINKCOMSTR.py @@ -72,7 +72,21 @@ Linking test1.exe from test1.obj test2.obj test.must_match('test1.exe', "test1.obj\ntest2.obj\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 ...', + LINKCOMSTR = 'Linking $TARGET ...') +env.Program('test', 'test.cpp') +""") +test.write('test.cpp', """ +int main(int argc, char **argv) {} +""") +test.run() +if ("Linking" not in test.stdout()): + test.fail_test() test.pass_test() diff --git a/test/LINK/SHLINKCOMSTR.py b/test/LINK/SHLINKCOMSTR.py index dd6f22b..f97040a 100644 --- a/test/LINK/SHLINKCOMSTR.py +++ b/test/LINK/SHLINKCOMSTR.py @@ -91,6 +91,22 @@ 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() + test.pass_test() |