diff options
Diffstat (limited to 'test/Libs')
-rw-r--r-- | test/Libs/SharedLibrary-update-deps.py | 17 | ||||
-rw-r--r-- | test/Libs/bug2903/SConstruct | 13 | ||||
-rw-r--r-- | test/Libs/bug2903/SConstruct-libs (renamed from test/Libs/bug2909/SConstruct-libs) | 0 | ||||
-rw-r--r-- | test/Libs/bug2903/lib.c (renamed from test/Libs/bug2909/lib.c) | 0 | ||||
-rw-r--r-- | test/Libs/bug2903/main.c (renamed from test/Libs/bug2909/main.c) | 0 | ||||
-rw-r--r-- | test/Libs/bug2909/SConstruct | 3 |
6 files changed, 28 insertions, 5 deletions
diff --git a/test/Libs/SharedLibrary-update-deps.py b/test/Libs/SharedLibrary-update-deps.py index 24c5262..e8ec2ab 100644 --- a/test/Libs/SharedLibrary-update-deps.py +++ b/test/Libs/SharedLibrary-update-deps.py @@ -26,18 +26,20 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Test that SharedLibrary() updates when a different lib is linked, even if it has the same md5. -This is Tigris bug #2909. +This is Tigris bug #2903. """ +import sys import os.path import TestSCons test = TestSCons.TestSCons() -test.dir_fixture( "bug2909" ) +test.dir_fixture( "bug2903" ) # Build the sub-libs (don't care about details of this) test.run(arguments='-f SConstruct-libs') + # This should build the main lib, using libfoo.so test.run(arguments='libname=foo') # This should rebuild the main lib, using libbar.so; @@ -48,6 +50,17 @@ test.must_not_contain_any_line(test.stdout(), ["is up to date"]) test.run(arguments='libname=foo') test.must_not_contain_any_line(test.stdout(), ["is up to date"]) +# Now try changing the link command line (in an innocuous way); should rebuild. +if sys.platform == 'win32': + extraflags='shlinkflags=/DEBUG' +else: + extraflags='shlinkflags=-g' + +test.run(arguments=['libname=foo', extraflags]) +test.must_not_contain_any_line(test.stdout(), ["is up to date"]) +test.run(arguments=['libname=foo', extraflags]) +test.must_contain_all_lines(test.stdout(), ["is up to date"]) + test.pass_test() # Local Variables: diff --git a/test/Libs/bug2903/SConstruct b/test/Libs/bug2903/SConstruct new file mode 100644 index 0000000..f7b66a8 --- /dev/null +++ b/test/Libs/bug2903/SConstruct @@ -0,0 +1,13 @@ +# SConstruct for testing but #2903. +# The test changes the lib name to make sure it rebuilds +# when the name changes, even if the content of the lib is the same. +# Also, the test passes in extra shlinkflags to ensure things rebuild +# when other linker options change, and not when they don't. +# (This doesn't specifically test LIBPATH, but there's a test for +# that already.) +env=Environment() +libname=ARGUMENTS.get('libname', 'foo') +env['SHLINKCOM'] = env['SHLINKCOM'] + ' $EXTRA_SHLINKFLAGS' +shlinkflags=ARGUMENTS.get('shlinkflags', '') +env.SharedLibrary('myshared', ['main.c'], + LIBS=[libname], LIBPATH='.', EXTRA_SHLINKFLAGS=shlinkflags) diff --git a/test/Libs/bug2909/SConstruct-libs b/test/Libs/bug2903/SConstruct-libs index 3f59f9c..3f59f9c 100644 --- a/test/Libs/bug2909/SConstruct-libs +++ b/test/Libs/bug2903/SConstruct-libs diff --git a/test/Libs/bug2909/lib.c b/test/Libs/bug2903/lib.c index 048f715..048f715 100644 --- a/test/Libs/bug2909/lib.c +++ b/test/Libs/bug2903/lib.c diff --git a/test/Libs/bug2909/main.c b/test/Libs/bug2903/main.c index 3fe7d49..3fe7d49 100644 --- a/test/Libs/bug2909/main.c +++ b/test/Libs/bug2903/main.c diff --git a/test/Libs/bug2909/SConstruct b/test/Libs/bug2909/SConstruct deleted file mode 100644 index 2c5440b..0000000 --- a/test/Libs/bug2909/SConstruct +++ /dev/null @@ -1,3 +0,0 @@ -env=Environment() -libname=ARGUMENTS.get('libname', 'foo') -env.SharedLibrary('myshared', ['main.c'], LIBS=[libname], LIBPATH='.')
\ No newline at end of file |