Fix the --implicit-deps-unchanged test so it works correctly regardless
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 21 Jan 2009 19:24:07 +0000 (19:24 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 21 Jan 2009 19:24:07 +0000 (19:24 +0000)
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

index d03cd9b4809e15fec4426510fad927fd6c317306..d682d4391316b462e94bb2e780d3023329a3df8f 100644 (file)
@@ -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: