blob: 234f97376a402d52e0eee00e28e27d81a04a5f5d [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2
Brad Bishopa5c52ff2018-11-23 10:55:50 +13003LOG="$(pwd)/test.log"
4# make the test continue to execute even one fail
5./test --keep-going 2>&1|tee ${LOG}
6# translate the test report
7# "tests/18imsm-r10_4d-takeover-r0_2d... succeeded" -> "PASS: tests/18imsm-r10_4d-takeover-r0_2d"
8# "tests/19raid6repair... FAILED - see //log for details" -> "FAIL: tests/19raid6repair"
9sed -i -e '/succeeded/ s/^/PASS: /' -e '/FAILED/ s/^/FAIL: /' ${LOG}
10sed -i -e 's/... FAILED//g' -e 's/... succeeded//g' ${LOG}
11passed=`grep PASS: ${LOG}|wc -l`
12failed=`grep FAIL: ${LOG}|wc -l`
13all=$((passed + failed))
14
15( echo "=== Test Summary ==="
16 echo "TOTAL: ${all}"
17 echo "PASSED: ${passed}"
18 echo "FAILED: ${failed}"
19) | tee -a /${LOG}