summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-08-05 03:11:59 (GMT)
committerSteven Knight <knight@baldmt.com>2002-08-05 03:11:59 (GMT)
commit8467314faf70040103f4110a9b67b4c4ed6659d3 (patch)
tree36172d39527ad930113d6de502a6aff447349f9f /test
parentc59024cf9f9661859e74619c142bbda1d66b5866 (diff)
downloadSCons-8467314faf70040103f4110a9b67b4c4ed6659d3.zip
SCons-8467314faf70040103f4110a9b67b4c4ed6659d3.tar.gz
SCons-8467314faf70040103f4110a9b67b4c4ed6659d3.tar.bz2
Fix incorrect time stamp for linked files (Bug 589288) (Anthony Roach)
Diffstat (limited to 'test')
-rw-r--r--test/BuildDir.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/BuildDir.py b/test/BuildDir.py
index a283ac7..79f0eb0 100644
--- a/test/BuildDir.py
+++ b/test/BuildDir.py
@@ -195,6 +195,22 @@ if f77:
test.run(program = bar51, stdout = " b1.for\n")
test.run(program = bar52, stdout = " b2.for\n")
+
+import os
+import stat
+def equal_stats(x,y):
+ x = os.stat(x)
+ y = os.stat(y)
+ return (stat.S_IMODE(x[stat.ST_MODE]) == stat.S_IMODE(y[stat.ST_MODE]) and
+ x[stat.ST_ATIME] == y[stat.ST_ATIME] and
+ x[stat.ST_MTIME] == y[stat.ST_MTIME])
+
+# Make sure we did duplicate the source files in build/var2, and that their stats are the same:
+test.fail_test(not os.path.exists(test.workpath('test', 'build', 'var2', 'f1.c')))
+test.fail_test(not os.path.exists(test.workpath('test', 'build', 'var2', 'f2.in')))
+test.fail_test(not equal_stats(test.workpath('test', 'build', 'var2', 'f1.c'), test.workpath('test', 'src', 'f1.c')))
+test.fail_test(not equal_stats(test.workpath('test', 'build', 'var2', 'f2.in'), test.workpath('test', 'src', 'f2.in')))
+
# Make sure we didn't duplicate the source files in build/var3.
test.fail_test(os.path.exists(test.workpath('test', 'build', 'var3', 'f1.c')))
test.fail_test(os.path.exists(test.workpath('test', 'build', 'var3', 'f2.in')))