From 58d722532fa83041c28b6ae6836cb731d9ec8e55 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sat, 10 Jan 2004 12:47:07 +0000 Subject: Better test for use of Configure() in nested SConscript files.. --- test/Configure.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/test/Configure.py b/test/Configure.py index 6d024f2..d3a8db7 100644 --- a/test/Configure.py +++ b/test/Configure.py @@ -386,10 +386,13 @@ env.MyAction('target', []) test.run(chdir=work_dir, status=2, stderr="scons: *** Calling Configure from Builders is not supported.\n") - # 4.3 test the calling Configure from multiple subsidiary - # SConscript files does *not* result in an error. + # 4.3 test the calling Configure from multiple subsidiary, + # nested SConscript files does *not* result in an error. - test.subdir([work_dir, 'dir1'], [work_dir, 'dir2']) + test.subdir([work_dir, 'dir1'], + [work_dir, 'dir2'], + [work_dir, 'dir2', 'sub1'], + [work_dir, 'dir2', 'sub1', 'sub2']) test.write([work_dir, 'SConstruct'], """ env = Environment() SConscript(dirs=['dir1', 'dir2'], exports="env") @@ -403,6 +406,18 @@ conf.Finish() Import("env") conf = env.Configure() conf.Finish() +SConscript(dirs=['sub1'], exports="env") +""") + test.write([work_dir, 'dir2', 'sub1', 'SConscript'], """ +Import("env") +conf = env.Configure() +conf.Finish() +SConscript(dirs=['sub2'], exports="env") +""") + test.write([work_dir, 'dir2', 'sub1', 'sub2', 'SConscript'], """ +Import("env") +conf = env.Configure() +conf.Finish() """) test.run(chdir=work_dir) -- cgit v0.12