diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
commit | 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/test_script.in | |
parent | Initial commit. (diff) | |
download | e2fsprogs-upstream.tar.xz e2fsprogs-upstream.zip |
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_script.in')
-rw-r--r-- | tests/test_script.in | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/test_script.in b/tests/test_script.in new file mode 100644 index 0000000..442999d --- /dev/null +++ b/tests/test_script.in @@ -0,0 +1,52 @@ +#!/bin/sh +# Run all or specified test scripts +# + +case "$1" in + --valgrind) + export USE_VALGRIND="valgrind -q --sim-hints=lax-ioctls" + shift + ;; + --valgrind-leakcheck) + export USE_VALGRIND="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log" + shift + ;; + --failed) + DO_FAILED=yes + shift + ;; +esac + +TESTS= + +if test -n "$DO_FAILED"; then + FAILED=$(find . -maxdepth 1 -name \*.failed) + if test -z "$FAILED" ; then + 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}_*" ;; + *) TESTS="$TESTS $SRCDIR/$i" ;; + esac +done + +if test "$TESTS"x = x ; then + if test -n "$DO_FAILED"; then + exit 0 + fi + TESTS=`ls -d $SRCDIR/[a-zA-Z]_*` +fi + +for test_dir in $TESTS; do + ./test_one $test_dir +done + +$SRCDIR/test_post |