Changeset 1509 for zzuf/trunk/test


Ignore:
Timestamp:
Dec 22, 2006, 5:54:55 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Fix a cleanup bug in the testsuite.
  • If any of the tests failed, do not erase the test files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/test/testsuite.sh

    r1500 r1509  
    3131
    3232cleanup() {
    33     rm -f /tmp/zzuf-zero-$$
    34     rm -f /tmp/zzuf-random-$$
    35     rm -f /tmp/zzuf-one-$$
    36     exit 0
     33    if [ "$FAILED" = 0 ]; then
     34        rm -f /tmp/zzuf-zero-$$
     35        rm -f /tmp/zzuf-random-$$
     36        rm -f /tmp/zzuf-text-$$
     37    fi
    3738}
    3839
     
    7071    done
    7172done
     73cleanup
    7274
    7375if [ "$FAILED" != 0 ]; then
    74     echo "$FAILED tests failed out of $TESTED"
     76    echo "$FAILED tests failed out of $TESTED. Files preserved:"
     77    echo "  /tmp/zzuf-zero-$$"
     78    echo "  /tmp/zzuf-random-$$"
     79    echo "  /tmp/zzuf-text-$$"
    7580    exit 1
    7681fi
    7782echo "All $TESTED tests OK."
    78 cleanup
    7983exit 0
    8084
Note: See TracChangeset for help on using the changeset viewer.