diff options
author | Steven Knight <knight@baldmt.com> | 2004-05-25 14:12:47 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-05-25 14:12:47 (GMT) |
commit | 18fa3dcb772e0c7baab9b9f37678fc908017f4e3 (patch) | |
tree | 4df8402e19d7822627f0cb5da9166931ef5a28f6 /test/SConscript.py | |
parent | 1e098e1b44b7c80c512edb47fec26d6c058c52b1 (diff) | |
download | SCons-18fa3dcb772e0c7baab9b9f37678fc908017f4e3.zip SCons-18fa3dcb772e0c7baab9b9f37678fc908017f4e3.tar.gz SCons-18fa3dcb772e0c7baab9b9f37678fc908017f4e3.tar.bz2 |
Make env.SConscript() expand dirs names.
Diffstat (limited to 'test/SConscript.py')
-rw-r--r-- | test/SConscript.py | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/test/SConscript.py b/test/SConscript.py index 69b7a82..e70fb36 100644 --- a/test/SConscript.py +++ b/test/SConscript.py @@ -364,24 +364,42 @@ test.run(arguments = ".", build_str = "scons: `.' is up to date.\n")) # Test calling SConscript through a construction environment. -test.subdir('sub') +test.subdir('sub1', 'sub2') + test.write("SConstruct", """\ -env = Environment(SUBDIR='sub') +env = Environment(SUB1='sub1', SUB2='sub2') print "SConstruct" x = 'xxx' -env.Export("x") -env.SConscript('$SUBDIR/SConscript') +y = 'yyy' +env.Export(["x", "y"]) +env.SConscript('$SUB1/SConscript') +env.SConscript(dirs=['$SUB2']) """) -test.write(['sub', 'SConscript'], """\ +test.write(['sub1', 'SConscript'], """\ env = Environment() env.Import("x") -print "sub/SConscript" +print "sub1/SConscript" print "x =", x """) +test.write(['sub2', 'SConscript'], """\ +env = Environment() +env.Import("y") +print "sub2/SConscript" +print "y =", y +""") + +expect = """\ +SConstruct +sub1/SConscript +x = xxx +sub2/SConscript +y = yyy +""" + test.run(arguments = ".", - stdout = test.wrap_stdout(read_str = "SConstruct\nsub/SConscript\nx = xxx\n", + stdout = test.wrap_stdout(read_str = expect, build_str = "scons: `.' is up to date.\n")) test.write("SConstruct", """\ |