]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make tests for include file trustability resistent to unsynchronized clocks
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 30 May 2010 11:42:54 +0000 (13:42 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 30 May 2010 11:42:54 +0000 (13:42 +0200)
test.sh

diff --git a/test.sh b/test.sh
index a51c9cff53c771f868a539844f4f7a8ff679d4ea..0a9dcba8b5b156fa0b172c091957f66b307fc7b1 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -980,7 +980,7 @@ EOF
 #!/bin/sh
 CCACHE_DISABLE=1 # If $COMPILER happens to be a ccache symlink...
 export CCACHE_DISABLE
-[ x\$2 = "x-E" ] && touch new.h # Be sure that mtime >= time_of_compilation
+[ x\$2 = "x-E" ] && touch -t `date +%Y%m%d%H%M.%S` new.h # Be sure that mtime >= time_of_compilation
 exec $COMPILER "\$@"
 EOF
     chmod +x $touchy_compiler
@@ -1009,7 +1009,7 @@ EOF
 #!/bin/sh
 CCACHE_DISABLE=1 # If $COMPILER happens to be a ccache symlink...
 export CCACHE_DISABLE
-[ x\$2 = "x-E" ] && touch new.h # Be sure that mtime >= time_of_compilation
+[ x\$2 = "x-E" ] && touch -t `date +%Y%m%d%H%M.%S` new.h # Be sure that mtime >= time_of_compilation
 exec $COMPILER "\$@"
 EOF
     chmod +x $touchy_compiler