summaryrefslogtreecommitdiffstats
path: root/test/BuildDir-errors.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-11-12 15:14:47 (GMT)
committerSteven Knight <knight@baldmt.com>2003-11-12 15:14:47 (GMT)
commit097d6c11f0670cff8044abca40dc284451e8b3c1 (patch)
tree72ad78f5695eb82226e4791a88de48b74e7818b7 /test/BuildDir-errors.py
parenta8283ef91c180641bc1f39b50d64317b3e589b84 (diff)
downloadSCons-097d6c11f0670cff8044abca40dc284451e8b3c1.zip
SCons-097d6c11f0670cff8044abca40dc284451e8b3c1.tar.gz
SCons-097d6c11f0670cff8044abca40dc284451e8b3c1.tar.bz2
Make duplicate build dir specifications be an error. (Anthony Roach)
Diffstat (limited to 'test/BuildDir-errors.py')
-rw-r--r--test/BuildDir-errors.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/BuildDir-errors.py b/test/BuildDir-errors.py
index ead5056..4941a64 100644
--- a/test/BuildDir-errors.py
+++ b/test/BuildDir-errors.py
@@ -151,5 +151,22 @@ scons: internal stack trace:
f.close()
-#
+# ensure that specifying multiple source directories for one
+# build directory results in an error message, rather
+# than just silently failing.
+test.subdir('duplicate', ['duplicate', 'src1'], ['duplicate', 'src2'])
+test.write(['duplicate', 'SConstruct'], """\
+BuildDir('build', 'src1')
+BuildDir('build', 'src2')
+""")
+
+test.run(chdir = 'duplicate',
+ arguments = ".",
+ status = 2,
+ stderr = None)
+test.fail_test(test.stderr() != """
+scons: *** 'build' already has a source directory: 'src1'.
+File \"SConstruct\", line 2, in ?
+""")
+
test.pass_test()