diff options
author | Steven Knight <knight@baldmt.com> | 2003-08-09 03:30:48 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-08-09 03:30:48 (GMT) |
commit | ef6d3c2883fc43048e4eb5418eeb082d58b9d6cb (patch) | |
tree | 6b82fbae7e677011698bc39debd81d1572ff5c8c /test | |
parent | 2e861a0422e5330249e360b5098b3ad00d26b5e9 (diff) | |
download | SCons-ef6d3c2883fc43048e4eb5418eeb082d58b9d6cb.zip SCons-ef6d3c2883fc43048e4eb5418eeb082d58b9d6cb.tar.gz SCons-ef6d3c2883fc43048e4eb5418eeb082d58b9d6cb.tar.bz2 |
Multi-level build dir with Object() and duplicate=0.
Diffstat (limited to 'test')
-rw-r--r-- | test/SConscript-build_dir.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/SConscript-build_dir.py b/test/SConscript-build_dir.py index 165619a..d67fdac 100644 --- a/test/SConscript-build_dir.py +++ b/test/SConscript-build_dir.py @@ -197,4 +197,41 @@ test.fail_test(os.path.exists(test.workpath('build', 'var8', 'aaa.in'))) test.fail_test(os.path.exists(test.workpath('build', 'var8', 'bbb.in'))) test.fail_test(os.path.exists(test.workpath('build', 'var8', 'ccc.in'))) +################### +test.subdir('test2') + +test.write(['test2', 'SConstruct'], """\ +SConscript('SConscript', build_dir='Build', src_dir='.', duplicate=0) +""") + +test.write(['test2', 'SConscript'], """\ +env = Environment() +foo_obj = env.Object('foo.c') +env.Program('foo', [foo_obj, 'bar.c']) +""") + +test.write(['test2', 'bar.c'], r""" +void +bar(void) { + printf("bar.c\n"); +} +""") + +test.write(['test2', 'foo.c'], """\ +int +main(int argc, char *argv[]) { + bar(); + printf("foo.c\n"); +} +""") + +test.run(chdir="test2") + +_obj = TestSCons._obj + +test.fail_test(os.path.exists(test.workpath('test2', 'foo' + _obj))) +test.fail_test(os.path.exists(test.workpath('test2', 'bar' + _obj))) +test.fail_test(not os.path.exists(test.workpath('test2', 'Build', 'foo' + _obj))) +test.fail_test(not os.path.exists(test.workpath('test2', 'Build', 'bar' + _obj))) + test.pass_test() |