diff options
author | Steven Knight <knight@baldmt.com> | 2009-01-21 19:24:07 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-01-21 19:24:07 (GMT) |
commit | 6537bb708baa7218286299742fa9c28ed0183930 (patch) | |
tree | e0b82e06a38c2d76a755021c5af1a118bf8be61b /test | |
parent | 6bf79804a81d6b39c378bbad55b580827398492d (diff) | |
download | SCons-6537bb708baa7218286299742fa9c28ed0183930.zip SCons-6537bb708baa7218286299742fa9c28ed0183930.tar.gz SCons-6537bb708baa7218286299742fa9c28ed0183930.tar.bz2 |
Fix the --implicit-deps-unchanged test so it works correctly regardless
of whether or not the compiler inserts timestamp information in the
generated object files.
Diffstat (limited to 'test')
-rw-r--r-- | test/implicit-cache/basic.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/implicit-cache/basic.py b/test/implicit-cache/basic.py index d03cd9b..d682d43 100644 --- a/test/implicit-cache/basic.py +++ b/test/implicit-cache/basic.py @@ -274,14 +274,19 @@ test.write(['include', 'foo.h'], r""" #include "bar.h" """) +# Cache the dependencies of prog_obj: foo.h and its included bar.h. test.run(arguments = "--implicit-cache " + args) +# Now add baz.h to the implicit dependencies in foo.h. test.write(['include', 'foo.h'], r""" #define FOO_STRING "include/foo.h 3\n" #include "baz.h" #include "bar.h" """) +# Rebuild variant_prog_obj because the already-cached foo.h changed, +# but use --implicit-deps-unchanged to avoid noticing the addition +# of baz.h to the implicit dependencies. test.not_up_to_date(options = "--implicit-deps-unchanged", arguments = variant_prog_obj) @@ -289,11 +294,16 @@ test.write(['include', 'baz.h'], r""" #define BAZ_STRING "include/baz.h 2\n" """) +# variant_prog_obj is still up to date, because it doesn't know about +# baz.h and therefore the change we just made to it. test.up_to_date(options = "--implicit-deps-unchanged", - arguments = variant_prog) + arguments = variant_prog_obj) +# Now rebuild it normally. test.not_up_to_date(arguments = variant_prog_obj) +# And rebuild its executable, just so everything's normal. +test.run(arguments = variant_prog) # Test forcing rescanning: |