From bc08c45aed2e50d33877c3a9648f6d2cf96a2353 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 21 Nov 2010 17:06:09 +0100 Subject: [PATCH] test: New attempt at coping with unsynchronized clocks for new include file --- test.sh | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) 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 -- 2.47.2