diff options
author | Steven Knight <knight@baldmt.com> | 2002-05-15 01:47:32 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-05-15 01:47:32 (GMT) |
commit | f90f72f7e364490fa345681b863cbec55555fa40 (patch) | |
tree | c977dabc0e2e95848aed5d37689e703a9fe9b262 /test/option--implicit-cache.py | |
parent | 126d1b3bd27c4ba02c7824ebd9745229d658de40 (diff) | |
download | SCons-f90f72f7e364490fa345681b863cbec55555fa40.zip SCons-f90f72f7e364490fa345681b863cbec55555fa40.tar.gz SCons-f90f72f7e364490fa345681b863cbec55555fa40.tar.bz2 |
Fix a couple obscure bugs. (Anthony Roach)
Diffstat (limited to 'test/option--implicit-cache.py')
-rw-r--r-- | test/option--implicit-cache.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/option--implicit-cache.py b/test/option--implicit-cache.py index fb5ace2..9a28271 100644 --- a/test/option--implicit-cache.py +++ b/test/option--implicit-cache.py @@ -72,6 +72,11 @@ r""" #define BAR_STRING "include/bar.h 1\n" """) +test.write(['include', 'baz.h'], +r""" +#define BAZ_STRING "include/baz.h 1\n" +""") + test.write(['subdir', 'prog.c'], r""" #include <foo.h> @@ -134,6 +139,50 @@ test.run(program = test.workpath(variant_prog), test.up_to_date(arguments = args) +# Make sure that changing the order of includes causes rebuilds and +# doesn't produce redundant rebuilds: +test.write(['include', 'foo.h'], +r""" +#define FOO_STRING "include/foo.h 2\n" +#include "bar.h" +#include "baz.h" +""") + +test.run(arguments = "--implicit-cache " + args) + +test.run(program = test.workpath(prog), + stdout = "subdir/prog.c\ninclude/foo.h 2\ninclude/bar.h 1\n") + +test.run(program = test.workpath(subdir_prog), + stdout = "subdir/prog.c\nsubdir/include/foo.h 1\nsubdir/include/bar.h 1\n") + +test.run(program = test.workpath(variant_prog), + stdout = "subdir/prog.c\ninclude/foo.h 2\ninclude/bar.h 1\n") + +test.up_to_date(arguments = args) + +test.write(['include', 'foo.h'], +r""" +#define FOO_STRING "include/foo.h 2\n" +#include "baz.h" +#include "bar.h" +""") + +test.run(arguments = "--implicit-cache " + args) + +test.run(program = test.workpath(prog), + stdout = "subdir/prog.c\ninclude/foo.h 2\ninclude/bar.h 1\n") + +test.run(program = test.workpath(subdir_prog), + stdout = "subdir/prog.c\nsubdir/include/foo.h 1\nsubdir/include/bar.h 1\n") + +test.run(program = test.workpath(variant_prog), + stdout = "subdir/prog.c\ninclude/foo.h 2\ninclude/bar.h 1\n") + +test.up_to_date(arguments = args) + + + # Add inc2/foo.h that should shadow include/foo.h, but # because of implicit dependency caching, scons doesn't # detect this: |