blob: d3b5e793c3c5be121f2edf2f9334e0b416b3e00d [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
Brad Bishopacc069e2019-09-13 06:48:36 -040013# Run only the libevent "regress" test. All other test scripts in the
14# libevent "test" folder are related to performance, e.g. read/write
15# rates, and/or do not provide a pass/fail output that can be recorded
16# in the ptest log.
17./test/regress 2>&1| sed -e '/TESTS/d' -e '/tests/d' -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 -050018
Brad Bishop79641f22019-09-10 07:20:22 -040019passed=`grep PASS ${LOG}|wc -l`
20failed=`grep FAIL ${LOG}|wc -l`
21skipped=`grep -E SKIP ${LOG}|wc -l`
22all=$((passed + failed + skipped))
23
24( echo "=== Test Summary ==="
25 echo "TOTAL: ${all}"
26 echo "PASSED: ${passed}"
27 echo "FAILED: ${failed}"
28 echo "SKIPPED: ${skipped}"
29) | tee -a ${LOG}