blob: 080806dea99896452e0b3831109b011a3cdf7f36 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2
Brad Bishop79641f22019-09-10 07:20:22 -04003# run-ptest - 'ptest' test infrastructure shell script that
4# wraps the libevent test scripts
5#
6# Trevor Gamblin <trevor.gamblin@windriver.com>
7###############################################################
8LIBEVENTLIB=@libdir@/libevent
9LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log"
10
11cd ${LIBEVENTLIB}/ptest
12
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013for test in ./test/*
14do
Brad Bishop79641f22019-09-10 07:20:22 -040015 $test 2>&1| sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ; /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016done
17
Brad Bishop79641f22019-09-10 07:20:22 -040018passed=`grep PASS ${LOG}|wc -l`
19failed=`grep FAIL ${LOG}|wc -l`
20skipped=`grep -E SKIP ${LOG}|wc -l`
21all=$((passed + failed + skipped))
22
23( echo "=== Test Summary ==="
24 echo "TOTAL: ${all}"
25 echo "PASSED: ${passed}"
26 echo "FAILED: ${failed}"
27 echo "SKIPPED: ${skipped}"
28) | tee -a ${LOG}