summaryrefslogtreecommitdiffstats
path: root/test/CacheDir.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-24 10:58:40 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-24 10:58:40 (GMT)
commitdb9601646dfa4e7848e239e7a935a0d36d821027 (patch)
tree8e3b953a18e7ed93c20c40f45285bec74d0bf503 /test/CacheDir.py
parent6d09bfffce34efdbb93eb4e7ccd2cbf811156608 (diff)
downloadSCons-db9601646dfa4e7848e239e7a935a0d36d821027.zip
SCons-db9601646dfa4e7848e239e7a935a0d36d821027.tar.gz
SCons-db9601646dfa4e7848e239e7a935a0d36d821027.tar.bz2
Fix --no-exec handling of cache. (Kevin Quick)
Diffstat (limited to 'test/CacheDir.py')
-rw-r--r--test/CacheDir.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CacheDir.py b/test/CacheDir.py
index ae3f76e..67d3ed4 100644
--- a/test/CacheDir.py
+++ b/test/CacheDir.py
@@ -65,6 +65,23 @@ test.write(['src', 'bbb.in'], "bbb.in\n")
test.write(['src', 'ccc.in'], "ccc.in\n")
#############################################################################
+
+# Verify that building with -n and an empty cache reports that proper
+# build operations would be taken, but that nothing is actually built
+# and that the cache is still empty.
+test.run(chdir = 'src', arguments = '-n .', stdout = test.wrap_stdout("""\
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
+"""))
+
+test.must_not_exist(test.workpath('src', 'aaa.out'))
+test.must_not_exist(test.workpath('src', 'bbb.out'))
+test.must_not_exist(test.workpath('src', 'ccc.out'))
+test.must_not_exist(test.workpath('src', 'all'))
+test.fail_test(len(os.listdir(test.workpath('cache1'))))
+
# Verify that a normal build works correctly, and clean up.
# This should populate the cache with our derived files.
test.run(chdir = 'src', arguments = '.')