blob: 080806dea99896452e0b3831109b011a3cdf7f36 [file] [log] [blame]
#!/bin/sh
# run-ptest - 'ptest' test infrastructure shell script that
# wraps the libevent test scripts
#
# Trevor Gamblin <trevor.gamblin@windriver.com>
###############################################################
LIBEVENTLIB=@libdir@/libevent
LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"
cd ${LIBEVENTLIB}/ptest
for test in ./test/*
do
$test 2>&1| sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ; /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG}
done
passed=`grep PASS ${LOG}|wc -l`
failed=`grep FAIL ${LOG}|wc -l`
skipped=`grep -E SKIP ${LOG}|wc -l`
all=$((passed + failed + skipped))
( echo "=== Test Summary ==="
echo "TOTAL: ${all}"
echo "PASSED: ${passed}"
echo "FAILED: ${failed}"
echo "SKIPPED: ${skipped}"
) | tee -a ${LOG}