We were rebuilding the checksummed file every time because redo-ifchange was incorrectly assuming that a child's changed_runid that's greater than my changed_runid means I'm dirty. But if my checked_runid is >= the child's checked_runid, then I'm clean, because my checksum didn't change. Clear as mud?
40 lines
1,006 B
Text
40 lines
1,006 B
Text
rm -f stampy usestamp stampy.log usestamp.log
|
|
echo one >inp
|
|
|
|
../flush-cache.sh
|
|
redo stampy
|
|
[ "$(wc -l <stampy.log)" -eq 1 ] || exit 11
|
|
|
|
redo-ifchange usestamp
|
|
[ "$(wc -l <stampy.log)" -eq 1 ] || exit 21
|
|
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 12
|
|
|
|
../flush-cache.sh
|
|
redo stampy
|
|
[ "$(wc -l <stampy.log)" -eq 2 ] || exit 31
|
|
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 32
|
|
|
|
redo-ifchange usestamp
|
|
[ "$(wc -l <stampy.log)" -eq 2 ] || exit 41
|
|
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 42
|
|
|
|
../flush-cache.sh
|
|
redo bob
|
|
redo-ifchange usestamp
|
|
[ "$(wc -l <stampy.log)" -eq 3 ] || exit 43
|
|
[ "$(wc -l <usestamp.log)" -eq 2 ] || exit 44
|
|
|
|
../flush-cache.sh
|
|
redo-ifchange usestamp
|
|
[ "$(wc -l <stampy.log)" -eq 3 ] || exit 45
|
|
[ "$(wc -l <usestamp.log)" -eq 2 ] || exit 46
|
|
|
|
../flush-cache.sh
|
|
echo two >inp
|
|
redo stampy
|
|
[ "$(wc -l <stampy.log)" -eq 4 ] || exit 51
|
|
[ "$(wc -l <usestamp.log)" -eq 2 ] || exit 52
|
|
|
|
redo-ifchange usestamp
|
|
[ "$(wc -l <stampy.log)" -eq 4 ] || exit 61
|
|
[ "$(wc -l <usestamp.log)" -eq 3 ] || exit 62
|