summaryrefslogtreecommitdiffstats
path: root/test/BuildDir.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-05-02 18:32:06 (GMT)
committerSteven Knight <knight@baldmt.com>2002-05-02 18:32:06 (GMT)
commitdeb10649b8ca07fe7fab0b7e1f32075f22140da4 (patch)
tree2d50c1d738110a476e4fe2d518eff6fafda47ea9 /test/BuildDir.py
parent971823ece48d9eae019eeca0ec7c8712764bc839 (diff)
downloadSCons-deb10649b8ca07fe7fab0b7e1f32075f22140da4.zip
SCons-deb10649b8ca07fe7fab0b7e1f32075f22140da4.tar.gz
SCons-deb10649b8ca07fe7fab0b7e1f32075f22140da4.tar.bz2
Fix a bug that caused BuildDir(duplicate=1) along with passing a Node to SConscript() to act as if BuildDir() wasn't used.
Diffstat (limited to 'test/BuildDir.py')
-rw-r--r--test/BuildDir.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/BuildDir.py b/test/BuildDir.py
index 893731c..4b835a6 100644
--- a/test/BuildDir.py
+++ b/test/BuildDir.py
@@ -42,15 +42,20 @@ foo21 = test.workpath('build', 'var2', 'foo1' + _exe)
foo22 = test.workpath('build', 'var2', 'foo2' + _exe)
foo31 = test.workpath('build', 'var3', 'foo1' + _exe)
foo32 = test.workpath('build', 'var3', 'foo2' + _exe)
+foo41 = test.workpath('build', 'var4', 'foo1' + _exe)
+foo42 = test.workpath('build', 'var4', 'foo2' + _exe)
test.write('SConstruct', """
src = Dir('src')
var2 = Dir('build/var2')
var3 = Dir('build/var3')
+var4 = Dir('build/var4')
+
BuildDir('build/var1', src)
BuildDir(var2, src)
BuildDir(var3, src, duplicate=0)
+BuildDir(var4, src, duplicate=0)
env = Environment(CPPPATH='#src')
SConscript('build/var1/SConscript', "env")
@@ -58,6 +63,8 @@ SConscript('build/var2/SConscript', "env")
env = Environment(CPPPATH=src)
SConscript('build/var3/SConscript', "env")
+SConscript(File('SConscript', var4), "env")
+
""")
test.subdir('src')
@@ -120,9 +127,16 @@ test.run(program = foo21, stdout = "f1.c\n")
test.run(program = foo22, stdout = "f2.c\n")
test.run(program = foo31, stdout = "f1.c\n")
test.run(program = foo32, stdout = "f2.c\n")
+test.run(program = foo41, stdout = "f1.c\n")
+test.run(program = foo42, stdout = "f2.c\n")
# Make sure we didn't duplicate the source files in build/var3.
test.fail_test(os.path.exists(test.workpath('build', 'var3', 'f1.c')))
test.fail_test(os.path.exists(test.workpath('build', 'var3', 'f2.in')))
+# Make sure we didn't duplicate the source files in build/var3.
+test.fail_test(os.path.exists(test.workpath('build', 'var4', 'f1.c')))
+test.fail_test(os.path.exists(test.workpath('build', 'var4', 'f2.in')))
+
+
test.pass_test()