Disable the tests that don't work with minimal/do.
...only when running under minimal/do, of course. The tests in question mostly fail because they're testing particular dependency-related behaviour, and minimal/do doesn't support dependencies, so naturally it doesn't work.
This commit is contained in:
parent
a75555e7a8
commit
b9987433c9
17 changed files with 42 additions and 10 deletions
7
clean.do
7
clean.do
|
|
@ -1,3 +1,8 @@
|
||||||
|
if [ -e .do_built ]; then
|
||||||
|
while read x; do
|
||||||
|
rm -f "$x"
|
||||||
|
done <.do_built
|
||||||
|
fi
|
||||||
redo t/clean
|
redo t/clean
|
||||||
rm -f *~ .*~ */*~ */.*~ *.pyc
|
rm -f *~ .*~ */*~ */.*~ *.pyc
|
||||||
rm -rf .redo t/.redo
|
rm -rf t/.redo
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ if [ -z "$DO_BUILT" ]; then
|
||||||
export DO_BUILT="$PWD/.do_built"
|
export DO_BUILT="$PWD/.do_built"
|
||||||
if [ -e "$DO_BUILT" ]; then
|
if [ -e "$DO_BUILT" ]; then
|
||||||
echo "Removing previously built files..." >&2
|
echo "Removing previously built files..." >&2
|
||||||
sort "$DO_BUILT" | uniq | tee "$DO_BUILT.new" |
|
sort -u "$DO_BUILT" | tee "$DO_BUILT.new" |
|
||||||
while read f; do rm -f "$f"; done
|
while read f; do rm -f "$f"; done
|
||||||
mv "$DO_BUILT.new" "$DO_BUILT"
|
mv "$DO_BUILT.new" "$DO_BUILT"
|
||||||
fi
|
fi
|
||||||
|
|
@ -55,6 +55,7 @@ _do()
|
||||||
RV=
|
RV=
|
||||||
(
|
(
|
||||||
export DO_DEPTH="$DO_DEPTH "
|
export DO_DEPTH="$DO_DEPTH "
|
||||||
|
export REDO_TARGET="$PWD/$TARGET"
|
||||||
set -e
|
set -e
|
||||||
. "$PWD/$DOFILE" >"$TARGET.tmp"
|
. "$PWD/$DOFILE" >"$TARGET.tmp"
|
||||||
) || RV="$?"
|
) || RV="$?"
|
||||||
|
|
@ -82,6 +83,8 @@ redo()
|
||||||
|
|
||||||
alias redo-ifchange="redo"
|
alias redo-ifchange="redo"
|
||||||
alias redo-ifcreate=":"
|
alias redo-ifcreate=":"
|
||||||
|
alias redo-stamp=":"
|
||||||
|
alias redo-always=":"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ -n "$*" ]; then
|
if [ -n "$*" ]; then
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,5 @@ redo always1
|
||||||
|
|
||||||
./flush-cache.sh
|
./flush-cache.sh
|
||||||
redo-ifchange always1
|
redo-ifchange always1
|
||||||
|
. ./skip-if-minimal-do.sh
|
||||||
[ "$(wc -l <always1.log)" -eq 2 ] || exit 31
|
[ "$(wc -l <always1.log)" -eq 2 ] || exit 31
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
. ./skip-if-minimal-do.sh
|
||||||
|
|
||||||
rm -f chdir1
|
rm -f chdir1
|
||||||
redo chdir2
|
redo chdir2
|
||||||
redo chdir3
|
redo chdir3
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
redo-ifchange 1.n0 2.n0 3.n0
|
redo-ifchange 1.n0 2.n0 3.n0
|
||||||
DEPS=$(seq 10 | sed 's/$/.n1/')
|
DEPS=$(seq 10 | sed 's/$/.n1/')
|
||||||
redo-ifchange $DEPS
|
redo-ifchange $DEPS
|
||||||
|
. ../skip-if-minimal-do.sh
|
||||||
. ./check-2.sh
|
. ./check-2.sh
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ redo-ifchange 1.out 2.out
|
||||||
../../flush-cache.sh
|
../../flush-cache.sh
|
||||||
touch 1.in
|
touch 1.in
|
||||||
redo-ifchange 1.out 2.out
|
redo-ifchange 1.out 2.out
|
||||||
[ "$(cat 1.log | wc -l)" = 2 ] || exit 57
|
|
||||||
[ "$(cat 2.log | wc -l)" = 1 ] || exit 58
|
[ "$(cat 2.log | wc -l)" = 1 ] || exit 58
|
||||||
|
. ../../skip-if-minimal-do.sh
|
||||||
|
[ "$(cat 1.log | wc -l)" = 2 ] || exit 57
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ redo t1
|
||||||
redo-ifchange t1
|
redo-ifchange t1
|
||||||
C1="$(wc -l <dir1/log)"
|
C1="$(wc -l <dir1/log)"
|
||||||
C2="$(wc -l <log)"
|
C2="$(wc -l <log)"
|
||||||
|
. ../../skip-if-minimal-do.sh
|
||||||
if [ "$C1" != 1 -o "$C2" != 2 ]; then
|
if [ "$C1" != 1 -o "$C2" != 2 ]; then
|
||||||
echo "failed: t1>t1, c1=$C1, c2=$C2" >&2
|
echo "failed: t1>t1, c1=$C1, c2=$C2" >&2
|
||||||
exit 55
|
exit 55
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@ touch static.in
|
||||||
redo-ifchange static1 static2
|
redo-ifchange static1 static2
|
||||||
|
|
||||||
COUNT=$(wc -l <static.log)
|
COUNT=$(wc -l <static.log)
|
||||||
|
. ../skip-if-minimal-do.sh
|
||||||
[ "$COUNT" = 4 ] || exit 55
|
[ "$COUNT" = 4 ] || exit 55
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,5 @@ redo-ifchange genfile1
|
||||||
redo-ifchange genfile1
|
redo-ifchange genfile1
|
||||||
|
|
||||||
COUNT=$(wc -l <genfile.log)
|
COUNT=$(wc -l <genfile.log)
|
||||||
|
. ../skip-if-minimal-do.sh
|
||||||
[ "$COUNT" = 2 ] || exit 77
|
[ "$COUNT" = 2 ] || exit 77
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
. ../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
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ rm -f t2.count
|
||||||
redo t2
|
redo t2
|
||||||
redo t2
|
redo t2
|
||||||
OUT=$(cat t2.count | wc -l)
|
OUT=$(cat t2.count | wc -l)
|
||||||
|
. ../skip-if-minimal-do.sh
|
||||||
if [ "$OUT" != 2 ]; then
|
if [ "$OUT" != 2 ]; then
|
||||||
echo "t2: expected 2"
|
echo "t2: expected 2"
|
||||||
exit 43
|
exit 43
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#echo "Flushing redo cache..." >&2
|
#echo "Flushing redo cache..." >&2
|
||||||
(
|
if [ -z "$DO_BUILT" ]; then
|
||||||
echo ".timeout 5000"
|
(
|
||||||
echo "pragma synchronous = off;"
|
echo ".timeout 5000"
|
||||||
echo "update Files set checked_runid=checked_runid-1, " \
|
echo "pragma synchronous = off;"
|
||||||
" changed_runid=changed_runid-1, " \
|
echo "update Files set checked_runid=checked_runid-1, " \
|
||||||
" failed_runid=failed_runid-1;"
|
" changed_runid=changed_runid-1, " \
|
||||||
) | sqlite3 "$REDO_BASE/.redo/db.sqlite3"
|
" failed_runid=failed_runid-1;"
|
||||||
|
) | sqlite3 "$REDO_BASE/.redo/db.sqlite3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
. ./skip-if-minimal-do.sh
|
||||||
rm -f makedir.log
|
rm -f makedir.log
|
||||||
redo makedir
|
redo makedir
|
||||||
touch makedir/outfile
|
touch makedir/outfile
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
. ./skip-if-minimal-do.sh
|
||||||
|
|
||||||
rm -f pleasefail
|
rm -f pleasefail
|
||||||
redo passfail
|
redo passfail
|
||||||
[ -e passfail ] || exit 42
|
[ -e passfail ] || exit 42
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@ redo silence
|
||||||
[ -e silence ] || exit 55
|
[ -e silence ] || exit 55
|
||||||
echo 'true' >silence.do
|
echo 'true' >silence.do
|
||||||
redo silence
|
redo silence
|
||||||
|
. ./skip-if-minimal-do.sh
|
||||||
[ ! -e silence ] || exit 66
|
[ ! -e silence ] || exit 66
|
||||||
rm -f silence.do
|
rm -f silence.do
|
||||||
|
|
|
||||||
5
t/skip-if-minimal-do.sh
Normal file
5
t/skip-if-minimal-do.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
if [ -n "$DO_BUILT" ]; then
|
||||||
|
echo "$REDO_TARGET: skipping: not supported in minimal/do." >&2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
@ -14,6 +14,7 @@ redo-ifchange usestamp
|
||||||
|
|
||||||
../flush-cache.sh
|
../flush-cache.sh
|
||||||
redo stampy
|
redo stampy
|
||||||
|
. ../skip-if-minimal-do.sh
|
||||||
[ "$(wc -l <stampy.log)" -eq 2 ] || exit 31
|
[ "$(wc -l <stampy.log)" -eq 2 ] || exit 31
|
||||||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 32
|
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 32
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue