Include TODO messages even if tests succeeds, so we can detect when something

suddenly started to work.
This commit is contained in:
pjd 2008-11-24 16:32:39 +00:00
parent 315e1d3a3c
commit 6f10d4552d

View File

@ -25,15 +25,19 @@ expect()
r=`${fstest} $* 2>/dev/null | tail -1` r=`${fstest} $* 2>/dev/null | tail -1`
echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1 echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "ok ${ntest}" if [ -z "${todomsg}" ]; then
echo "ok ${ntest}"
else
echo "ok ${ntest} # TODO ${todomsg}"
fi
else else
if [ -z "${todomsg}" ]; then if [ -z "${todomsg}" ]; then
echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}" echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}"
else else
echo "not ok ${ntest} # TODO ${todomsg}" echo "not ok ${ntest} # TODO ${todomsg}"
todomsg=""
fi fi
fi fi
todomsg=""
ntest=`expr $ntest + 1` ntest=`expr $ntest + 1`
} }
@ -46,30 +50,38 @@ jexpect()
r=`jail -s ${s} / fstest 127.0.0.1 /bin/sh -c "cd ${d} && ${fstest} $* 2>/dev/null" | tail -1` r=`jail -s ${s} / fstest 127.0.0.1 /bin/sh -c "cd ${d} && ${fstest} $* 2>/dev/null" | tail -1`
echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1 echo "${r}" | egrep '^'${e}'$' >/dev/null 2>&1
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "ok ${ntest}" if [ -z "${todomsg}" ]; then
echo "ok ${ntest}"
else
echo "ok ${ntest} # TODO ${todomsg}"
fi
else else
if [ -z "${todomsg}" ]; then if [ -z "${todomsg}" ]; then
echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}" echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}"
else else
echo "not ok ${ntest} # TODO ${todomsg}" echo "not ok ${ntest} # TODO ${todomsg}"
todomsg=""
fi fi
fi fi
todomsg=""
ntest=`expr $ntest + 1` ntest=`expr $ntest + 1`
} }
test_check() test_check()
{ {
if [ $* ]; then if [ $* ]; then
echo "ok ${ntest}" if [ -z "${todomsg}" ]; then
echo "ok ${ntest}"
else
echo "ok ${ntest} # TODO ${todomsg}"
fi
else else
if [ -z "${todomsg}" ]; then if [ -z "${todomsg}" ]; then
echo "not ok ${ntest}" echo "not ok ${ntest}"
else else
echo "not ok ${ntest} # TODO ${todomsg}" echo "not ok ${ntest} # TODO ${todomsg}"
todomsg=""
fi fi
fi fi
todomsg=""
ntest=`expr $ntest + 1` ntest=`expr $ntest + 1`
} }