Fix tests when the sqlite3 command line utility isn't installed.

We know the user already has to have python, so use its bindings.
This commit is contained in:
Joseph Garvin 2011-02-22 22:47:00 -06:00 committed by Avery Pennarun
commit d039aad57b
12 changed files with 50 additions and 41 deletions

View file

@ -1,10 +1,10 @@
rm -f *.out *.log
../../flush-cache.sh
../../flush-cache.py
redo-ifchange 1.out 2.out
[ "$(cat 1.log | wc -l)" -eq 1 ] || exit 55
[ "$(cat 2.log | wc -l)" -eq 1 ] || exit 56
../../flush-cache.sh
../../flush-cache.py
touch 1.in
redo-ifchange 1.out 2.out
[ "$(cat 2.log | wc -l)" -eq 1 ] || exit 58

View file

@ -1,11 +1,11 @@
rm -f log dir1/log dir1/stinky
touch t1.do
../../flush-cache.sh
../../flush-cache.py
redo t1
touch t1.do
../../flush-cache.sh
../../flush-cache.py
redo t1
../../flush-cache.sh
../../flush-cache.py
redo-ifchange t1
C1="$(wc -l <dir1/log)"
C2="$(wc -l <log)"

View file

@ -3,7 +3,7 @@ rm -f static.log
redo static1 static2
touch static.in
../flush-cache.sh
../flush-cache.py
redo-ifchange static1 static2
COUNT=$(wc -l <static.log)

View file

@ -1,19 +1,19 @@
rm -f genfile2 genfile2.do genfile.log
echo echo hello >genfile2.do
../flush-cache.sh
../flush-cache.py
redo genfile1
# this will cause a rebuild:
# genfile1 depends on genfile2 depends on genfile2.do
rm -f genfile2.do
../flush-cache.sh
../flush-cache.py
redo-ifchange genfile1
# but genfile2.do was gone last time, so genfile2 no longer depends on it.
# thus, it can be considered up-to-date. Prior versions of redo had a bug
# where the dependency on genfile2.do was never dropped.
../flush-cache.sh
../flush-cache.py
redo-ifchange genfile1
COUNT=$(wc -l <genfile.log)

View file

@ -6,7 +6,7 @@ if [ -e t1a ]; then
else
BEFORE=
fi
../flush-cache.sh
../flush-cache.py
redo-ifchange t1a # it definitely had to rebuild because t1dep changed
AFTER="$(cat t1a)"
if [ "$BEFORE" = "$AFTER" ]; then