From: Joel Rosdahl Date: Sun, 21 Nov 2010 16:06:09 +0000 (+0100) Subject: test: New attempt at coping with unsynchronized clocks for new include file X-Git-Tag: v3.1.2~1 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bc08c45aed2e50d33877c3a9648f6d2cf96a2353;p=thirdparty%2Fccache.git test: New attempt at coping with unsynchronized clocks for new include file --- diff --git a/test.sh b/test.sh index d4c6911f2..0558e4a7b 100755 --- a/test.sh +++ b/test.sh @@ -1109,21 +1109,12 @@ EOF cat <new.h int test; EOF - touchy_compiler=touchy-compiler.sh - cat <$touchy_compiler -#!/bin/sh -CCACHE_DISABLE=1 # If $COMPILER happens to be a ccache symlink... -export CCACHE_DISABLE -[ 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 - - $CCACHE ./$touchy_compiler -c new.c + touch -t 203801010000 new.h + $CCACHE $COMPILER -c new.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - $CCACHE ./$touchy_compiler -c new.c + $CCACHE $COMPILER -c new.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 1 checkstat 'cache miss' 1 @@ -1138,21 +1129,12 @@ EOF cat <new.h int test; EOF - touchy_compiler=touchy-compiler.sh - cat <$touchy_compiler -#!/bin/sh -CCACHE_DISABLE=1 # If $COMPILER happens to be a ccache symlink... -export CCACHE_DISABLE -[ 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 - - CCACHE_SLOPPINESS=include_file_mtime $CCACHE ./$touchy_compiler -c new.c + touch -t 203801010000 new.h + CCACHE_SLOPPINESS=include_file_mtime $CCACHE $COMPILER -c new.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - CCACHE_SLOPPINESS=include_file_mtime $CCACHE ./$touchy_compiler -c new.c + CCACHE_SLOPPINESS=include_file_mtime $CCACHE $COMPILER -c new.c checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1