mirror of https://github.com/vitalif/e2fsprogs
tests: teach test_script the --failed option
Teach test_script the --failed option, which asks it to rerun the tests that had previously failed. Signed-off-by: Theodore Ts'o <tytso@mit.edu>debian
parent
3166e2e540
commit
ded919125a
|
@ -5,24 +5,44 @@
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--valgrind)
|
--valgrind)
|
||||||
export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
|
export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls"
|
||||||
shift;
|
shift
|
||||||
;;
|
;;
|
||||||
--valgrind-leakcheck)
|
--valgrind-leakcheck)
|
||||||
export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
|
export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
|
||||||
shift;
|
shift
|
||||||
|
;;
|
||||||
|
--failed)
|
||||||
|
DO_FAILED=yes
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$1"x = x ; then
|
TESTS=
|
||||||
TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
|
|
||||||
else
|
if test -n "$DO_FAILED"; then
|
||||||
TESTS=
|
FAILED=$(find . -maxdepth 1 -name \*.failed)
|
||||||
for i; do
|
if test -z "$FAILED" ; then
|
||||||
case $i in
|
echo " "
|
||||||
|
echo "No (more) failed tests!"
|
||||||
|
echo " "
|
||||||
|
fi
|
||||||
|
for fname in $FAILED ; do
|
||||||
|
TESTS="$TESTS $SRCDIR/${fname%%.failed}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
for i; do
|
||||||
|
case $i in
|
||||||
[a-zA-Z]) TESTS="$TESTS $SRCDIR/${i}_*" ;;
|
[a-zA-Z]) TESTS="$TESTS $SRCDIR/${i}_*" ;;
|
||||||
*) TESTS="$TESTS $SRCDIR/$i" ;;
|
*) TESTS="$TESTS $SRCDIR/$i" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test "$TESTS"x = x ; then
|
||||||
|
if test -n "DO_FAILED"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
TESTS=`ls -d $SRCDIR/[a-zA-Z]_*`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for test_dir in $TESTS; do
|
for test_dir in $TESTS; do
|
||||||
|
|
Loading…
Reference in New Issue