redo-log: add automated tests, and fix some path bugs revealed by them.
When a log for X was saying it wanted to refer to Y, we used a relative path, but it was sometimes relative to the wrong starting location, so redo-log couldn't find it later. Two examples: - if default.o.do is handling builds for a/b/x.o, and default.o.do does 'redo a/b/x.h', the log for x.o should refer to ./x.h, not a/b/x.h. - if foo.do is handling builds for foo, and it does "cd a/b && redo x", the log for foo should refer to a/b/x, not just x.
This commit is contained in:
parent
7165b342f5
commit
4edb6f78e0
10 changed files with 125 additions and 20 deletions
5
t/370-logs/a/b/xlog.do
Normal file
5
t/370-logs/a/b/xlog.do
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
read pid <../../pid
|
||||
|
||||
# Test that log retrieval works correctly when run from a different base dir.
|
||||
redo-log -ru ../../x | grep -q "^$pid x stderr" || exit 45
|
||||
redo-log -ru ../../x | grep -q "^$pid y stderr" || exit 46
|
||||
Loading…
Add table
Add a link
Reference in a new issue