diff options
author | Steven Knight <knight@baldmt.com> | 2008-10-17 02:20:50 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-10-17 02:20:50 (GMT) |
commit | 0a99af4232a3be2d11a255c395e4ad757638c492 (patch) | |
tree | 9f16c8e29ffb2466c50b267a7d6f4c7c186729df /test/option/debug-includes.py | |
parent | 594f48886dfb67c4c2d232561007583bbceb3238 (diff) | |
download | SCons-0a99af4232a3be2d11a255c395e4ad757638c492.zip SCons-0a99af4232a3be2d11a255c395e4ad757638c492.tar.gz SCons-0a99af4232a3be2d11a255c395e4ad757638c492.tar.bz2 |
Issue 1568: fix a stack trace when --debug=include tries to handle
a library as an argument.
Diffstat (limited to 'test/option/debug-includes.py')
-rw-r--r-- | test/option/debug-includes.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/test/option/debug-includes.py b/test/option/debug-includes.py index 70857e6..41e5a84 100644 --- a/test/option/debug-includes.py +++ b/test/option/debug-includes.py @@ -38,8 +38,16 @@ import time test = TestSCons.TestSCons() test.write('SConstruct', """ -env = Environment(OBJSUFFIX = '.ooo', PROGSUFFIX = '.xxx') -env.Program('foo', Split('foo.c bar.c')) +env = Environment(OBJSUFFIX = '.obj', + SHOBJSUFFIX = '.shobj', + LIBPREFIX = '', + LIBSUFFIX = '.lib', + SHLIBPREFIX = '', + SHLIBSUFFIX = '.shlib', + ) +env.Program('foo.exe', ['foo.c', 'bar.c']) +env.StaticLibrary('foo', ['foo.c', 'bar.c']) +env.SharedLibrary('foo', ['foo.c', 'bar.c']) """) test.write('foo.c', r""" @@ -78,7 +86,7 @@ includes = """ +-foo.h +-bar.h """ -test.run(arguments = "--debug=includes foo.ooo") +test.run(arguments = "--debug=includes foo.obj") if string.find(test.stdout(), includes) == -1: print "Did not find expected string in standard output." @@ -88,6 +96,8 @@ if string.find(test.stdout(), includes) == -1: print test.stdout() test.fail_test() + + # In an ideal world, --debug=includes would also work when there's a build # failure, but this would require even more complicated logic to scan # all of the intermediate nodes that get skipped when the build failure @@ -102,14 +112,20 @@ if string.find(test.stdout(), includes) == -1: #THIS SHOULD CAUSE A BUILD FAILURE #""") -#test.run(arguments = "--debug=includes foo.xxx", +#test.run(arguments = "--debug=includes foo.exe", # status = 2, # stderr = None) #test.fail_test(string.find(test.stdout(), includes) == -1) + + # These shouldn't print out anything in particular, but # they shouldn't crash either: test.run(arguments = "--debug=includes .") test.run(arguments = "--debug=includes foo.c") +test.run(arguments = "--debug=includes foo.lib") +test.run(arguments = "--debug=includes foo.shlib") + + test.pass_test() |