From ebd251672bc312c24f133004c0a7967ffcaf33ac Mon Sep 17 00:00:00 2001 From: stevenknight Date: Wed, 21 Jan 2009 19:24:07 +0000 Subject: [PATCH] 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. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3917 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- test/implicit-cache/basic.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/implicit-cache/basic.py b/test/implicit-cache/basic.py index d03cd9b4..d682d439 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: -- 2.26.2