Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 3 | # run-ptest - 'ptest' test infrastructure shell script that |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame^] | 4 | # wraps the libevent test scripts |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 5 | # |
| 6 | # Trevor Gamblin <trevor.gamblin@windriver.com> |
| 7 | ############################################################### |
| 8 | LIBEVENTLIB=@libdir@/libevent |
| 9 | LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log" |
| 10 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame^] | 11 | cd ${LIBEVENTLIB}/ptest |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 12 | |
Brad Bishop | acc069e | 2019-09-13 06:48:36 -0400 | [diff] [blame] | 13 | # 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame^] | 19 | passed=`grep PASS: ${LOG}|wc -l` |
| 20 | failed=`grep FAIL: ${LOG}|wc -l` |
| 21 | skipped=`grep -E SKIP: ${LOG}|wc -l` |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 22 | all=$((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} |