touch -t $((199901010000 + m)) "$@"
}
+postdate() {
+ touch -t "$(($(date -u +%Y) + 1))01030000" "$@"
+}
+
file_size() {
wc -c $1 | awk '{print $1}'
}
# -------------------------------------------------------------------------
TEST "Too new source file"
- futuretimestamp=$(expr 1 + $(date -u +%Y))01030000
- touch new.c
- touch -t $futuretimestamp new.c
+ postdate new.c
$CCACHE_COMPILE -c new.c
expect_stat modified_input_file 1
cat <<EOF >new.h
int test;
EOF
- touch -t $futuretimestamp new.h
+ postdate new.h
$CCACHE_COMPILE -c new.c
expect_stat modified_input_file 1
# -------------------------------------------------------------------------
TEST "Too new source file ignored if sloppy"
- touch new.c
- touch -t $futuretimestamp new.c
+ postdate new.c
CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS include_file_mtime" $CCACHE_COMPILE -c new.c
expect_stat cache_miss 1