dracut/test/test-functions
David Dillow 261d029659 Have the test framework always run the cleanup script
Also remove some extra semicolons, and put the pointer to the test log
on its own line.
2009-06-06 00:05:33 -04:00

36 lines
691 B
Plaintext

while (($# > 0)); do
case $1 in
--run)
echo "TEST RUN: $TEST_DESCRIPTION"
test_run
exit $?;;
--setup)
echo "TEST SETUP: $TEST_DESCRIPTION"
test_setup
exit $?;;
--clean)
echo "TEST CLEANUP: $TEST_DESCRIPTION"
test_cleanup
exit $?;;
--all)
echo -n "TEST: $TEST_DESCRIPTION ";
(
test_setup && test_run
ret=$?
test_cleanup
exit $ret
) </dev/null >test.log 2>&1
ret=$?
if [ $ret -eq 0 ]; then
rm test.log
echo "[OK]"
else
echo "[FAILED]"
echo "see $(pwd)/test.log"
fi
exit $ret;;
*) break ;;
esac
shift
done