summaryrefslogtreecommitdiffstats
path: root/test/Mkdir.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-10-21 12:07:26 (GMT)
committerSteven Knight <knight@baldmt.com>2004-10-21 12:07:26 (GMT)
commitc9c69b3bd0dd817e589efcc83643e45071d2a95c (patch)
tree803f5bc5122b2a22d15f8375bab9361164487a6c /test/Mkdir.py
parent3e52ca38ff11bf7515dbeb05af362f370479bfb4 (diff)
downloadSCons-c9c69b3bd0dd817e589efcc83643e45071d2a95c.zip
SCons-c9c69b3bd0dd817e589efcc83643e45071d2a95c.tar.gz
SCons-c9c69b3bd0dd817e589efcc83643e45071d2a95c.tar.bz2
Handle use of Mkdir() when the file exists.
Diffstat (limited to 'test/Mkdir.py')
-rw-r--r--test/Mkdir.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/Mkdir.py b/test/Mkdir.py
index cdbcd4b..a198571 100644
--- a/test/Mkdir.py
+++ b/test/Mkdir.py
@@ -51,6 +51,11 @@ env.Command('f5.out', 'f5.in', [Mkdir("$DIR"), Cat])
env.Command('f6.out', 'f6.in', [Cat,
Mkdir("Mkdir-$SOURCE"),
Mkdir("$TARGET-Mkdir")])
+# Make sure that a user-defined Mkdir builder on a directory
+# doesn't get executed twice if it has to get called to create
+# directory for another target.
+env.Command(Dir('hello'), None, [Mkdir('$TARGET')])
+env.Command('hello/world', None, [Touch('$TARGET')])
""")
test.write('f2.in', "f2.in\n")
@@ -66,7 +71,9 @@ cat(["f5.out"], ["f5.in"])
cat(["f6.out"], ["f6.in"])
Mkdir("Mkdir-f6.in")
Mkdir("f6.out-Mkdir")
-""")
+Mkdir("hello")
+Touch("%s")
+""" % (os.path.join('hello', 'world')))
test.run(options = '-n', arguments = '.', stdout = expect)
test.must_not_exist('d1')
@@ -88,10 +95,13 @@ test.must_match('f5.out', "f5.in\n")
test.must_exist('f6.out')
test.must_exist('Mkdir-f6.in')
test.must_exist('f6.out-Mkdir')
+test.must_exist('hello')
+test.must_exist('hello/world')
test.write(['d1', 'file'], "d1/file\n")
test.write(['d3', 'file'], "d3/file\n")
test.write(['Mkdir-f6.in', 'file'], "Mkdir-f6.in/file\n")
test.write(['f6.out-Mkdir', 'file'], "f6.out-Mkdir/file\n")
+test.write(['hello', 'file'], "hello/file\n")
test.pass_test()