2 # run a single regression test
11 export USE_VALGRIND
="valgrind -q --sim-hints=lax-ioctls"
15 export USE_VALGRIND
="valgrind --sim-hints=lax-ioctls --leak-check=full --show-reachable=yes --log-file=/tmp/valgrind-%p.log"
25 *.failed|
*.new|
*.ok|
*.log|
*.tmp|
*.slow
) exit 0 ;;
31 if test "$TEST_CONFIG"x
= x
; then
32 TEST_CONFIG
=$SRCDIR/test_config
37 test_name
=`echo $test_dir | sed -e 's;.*/;;'`
39 if [ -f $test_dir ] ; then
42 if [ ! -d $test_dir ] ; then
43 echo "The test '$test_name' does not exist."
46 if [ -z "`ls $test_dir`" ]; then
49 if [ -f $test_dir/name
]; then
50 test_description
=`cat $test_dir/name`
55 if [ -n "$SKIP_SLOW_TESTS" -a -f $test_dir/is_slow_test
]; then
56 echo "$test_name: $test_description: skipped (slow test)"
60 rm -f $test_name.ok
$test_name.failed
$test_name.log
$test_name.slow
61 #echo -e -n "$test_name: $test_description:\r"
63 TMPFILE
=$
(mktemp
${TMPDIR:-/tmp}/e2fsprogs-tmp-
$test_name.XXXXXX
)
64 [ "$SKIP_UNLINK" != "true" ] && trap 'rm -f $TMPFILE ; exit' 0 1 2 15
67 if [ -f $test_dir/script ]; then
70 test_base
=`echo $test_name | sed -e 's/_.*//'`
71 default_script
=$SRCDIR/defaults
/${test_base}_script
72 if [ -f $default_script ]; then
73 .
$SRCDIR/defaults
/${test_base}_script
75 echo "$test_name: Missing test script $default_script!"
78 elapsed
=$
((SECONDS
- start
))
79 if [ $elapsed -gt 60 -a ! -f $test_dir/is_slow_test
]; then
80 echo "$test_name: *** took $elapsed seconds to finish ***" |
82 echo "$test_name: consider adding $test_dir/is_slow_test"
85 if [ "$SKIP_UNLINK" != "true" ] ; then