This tests the chdir-related bug from the previous commit.

This commit is contained in:
Avery Pennarun 2010-11-25 06:31:06 -08:00
commit a5855641f8
3 changed files with 16 additions and 6 deletions

3
t/chdir3.do Normal file
View file

@ -0,0 +1,3 @@
# make sure redo-ifchange records the dependency correctly if we chdir
cd ..
redo-ifchange t/chdir2

View file

@ -1,9 +1,16 @@
redo chdir1 rm -f chdir1
redo chdir2 redo chdir2
redo chdir3
. ./flush-cache.sh
redo-ifchange chdir3
rm -f chdir1 rm -f chdir1
. ./flush-cache.sh . ./flush-cache.sh
redo-ifchange chdir3
# chdir2 sets its dependency on chdir1 in an odd way, so this might fail if
# redo doesn't catch it
redo-ifchange chdir2
[ -e chdir1 ] || exit 77 [ -e chdir1 ] || exit 77
rm -f chdir1
. ./flush-cache.sh
redo-ifchange chdir3
[ -e chdir1 ] || exit 78

View file

@ -1,4 +1,4 @@
redo-ifchange all redo-ifchange all
./hello >&2 ./hello >&2
redo deltest deltest2 test.args test2.args passfailtest \ redo deltest deltest2 test.args test2.args passfailtest chdirtest \
curse/test deps/test "space dir/test" modetest makedir2 curse/test deps/test "space dir/test" modetest makedir2