Test for the previous bugfix.

This fails if you make test *twice* without the preceding patch.
Unfortunately I couldn't find a good way to make it fail if you only make
test once.
This commit is contained in:
Avery Pennarun 2010-11-21 04:29:28 -08:00
commit b19a918894
9 changed files with 24 additions and 3 deletions

View file

@ -22,7 +22,7 @@ if opt.verbose:
if opt.shuffle: if opt.shuffle:
os.environ['REDO_SHUFFLE'] = '1' os.environ['REDO_SHUFFLE'] = '1'
is_root = not os.environ.get('REDO_BASE', '') is_root = not os.environ.get('REDO', '')
if is_root: if is_root:
# toplevel call to redo # toplevel call to redo

View file

@ -1,2 +1,3 @@
redo-ifchange hello yellow bellow c d example/all curse/all redo-ifchange hello yellow bellow c d example/all curse/all deps/all

View file

@ -1,3 +1,3 @@
redo example/clean curse/clean redo example/clean curse/clean deps/clean
rm -f c c.c c.c.c c.c.c.b c.c.c.b.b d rm -f c c.c c.c.c c.c.c.b c.c.c.b.b d
rm -f hello [by]ellow *.o *~ .*~ CC LD rm -f hello [by]ellow *.o *~ .*~ CC LD

1
t/deps/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
t1a

1
t/deps/all.do Normal file
View file

@ -0,0 +1 @@
redo test1

1
t/deps/clean.do Normal file
View file

@ -0,0 +1 @@
rm -f *~ .*~ t1a

2
t/deps/t1a.do Normal file
View file

@ -0,0 +1,2 @@
redo-ifchange t1dep
echo $$

1
t/deps/t1dep.do Normal file
View file

@ -0,0 +1 @@
# nothing to do

14
t/deps/test1.do Normal file
View file

@ -0,0 +1,14 @@
# force-rebuild t1dep
redo t1dep
if [ -e t1a ]; then
BEFORE="$(cat t1a)"
else
BEFORE=
fi
redo-ifchange t1a # it definitely had to rebuild because t1dep changed
AFTER="$(cat t1a)"
if [ "$BEFORE" == "$AFTER" ]; then
echo "t1a was not rebuilt!" >&2
exit 43
fi