t/*: some cleanups so switching between redo and minimal/do works.
Because the two programs use separate state databases, it helps if we clean up some temp files between runs. Otherwise they might think you created some targets "by hand" and refuse to rebuild them.
This commit is contained in:
parent
637521070b
commit
728a19cd52
7 changed files with 21 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
# This may have been leftover from a previous run, when switching
|
||||||
|
# between "real" redo and minimal/do, so clean it up.
|
||||||
|
rm -f silence
|
||||||
|
|
||||||
echo 'echo hello' >silence.do
|
echo 'echo hello' >silence.do
|
||||||
redo silence
|
redo silence
|
||||||
[ -e silence ] || exit 55
|
[ -e silence ] || exit 55
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
# This may have been leftover from a previous run, when switching
|
||||||
|
# between "real" redo and minimal/do, so clean it up.
|
||||||
|
rm -f touch1
|
||||||
|
|
||||||
echo 'echo hello' >touch1.do
|
echo 'echo hello' >touch1.do
|
||||||
redo touch1
|
redo touch1
|
||||||
[ -e touch1 ] || exit 55
|
[ -e touch1 ] || exit 55
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,7 @@ touch fail
|
||||||
../flush-cache
|
../flush-cache
|
||||||
# since we created this file by hand, fail.do won't run, so it won't fail.
|
# since we created this file by hand, fail.do won't run, so it won't fail.
|
||||||
redo-ifchange fail >/dev/null 2>&1 || exit 55 # expected to pass
|
redo-ifchange fail >/dev/null 2>&1 || exit 55 # expected to pass
|
||||||
|
|
||||||
|
# Make sure we don't leave this lying around for future runs, or redo
|
||||||
|
# might mark it as "manually modified" (since we did!)
|
||||||
|
rm -f fail
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
. ../skip-if-minimal-do.sh
|
. ../skip-if-minimal-do.sh
|
||||||
|
|
||||||
redo overwrite1 2>&1 && exit 55
|
redo overwrite1 2>&1 && exit 55
|
||||||
redo overwrite2 2>&1 && exit 56
|
redo overwrite2 2>&1 && exit 56
|
||||||
redo overwrite3 2>&1 && exit 57
|
redo overwrite3 2>&1 && exit 57
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
# This may have been leftover from a previous run, when switching
|
||||||
|
# between "real" redo and minimal/do, so clean it up.
|
||||||
|
rm -f t1a
|
||||||
|
|
||||||
# force-rebuild t1dep
|
# force-rebuild t1dep
|
||||||
redo t1dep
|
redo t1dep
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,5 @@
|
||||||
|
# minimal/do doesn't need to "support" cyclic dependencies, because
|
||||||
|
# they're always a bug in the .do scripts :)
|
||||||
. ../skip-if-minimal-do.sh
|
. ../skip-if-minimal-do.sh
|
||||||
|
|
||||||
! redo a >/dev/null 2>&1 || exit 204
|
! redo a >/dev/null 2>&1 || exit 204
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ redo-ifchange b
|
||||||
d2=$(cat b.did)
|
d2=$(cat b.did)
|
||||||
[ "$d1" = "$d2" ] || exit 12
|
[ "$d1" = "$d2" ] || exit 12
|
||||||
|
|
||||||
|
. ../skip-if-minimal-do.sh
|
||||||
|
|
||||||
# forcibly changing a should rebuild b.
|
# forcibly changing a should rebuild b.
|
||||||
# a is already symlink to a.extra, but redo shouldn't care about the
|
# a is already symlink to a.extra, but redo shouldn't care about the
|
||||||
# target of symlinks, so it shouldn't freak out that a.extra has changed.
|
# target of symlinks, so it shouldn't freak out that a.extra has changed.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue