447d33c8cb8de67d029012e44f3aa03721e754ea
[AGL/meta-agl.git] / meta-agl-profile-core / recipes-devtools / valgrind / valgrind / run-ptest
1 #!/bin/sh
2
3 # run-ptest - 'ptest' test infrastructure shell script that
4 #   wraps the valgrind regression script vg_regtest. 
5 #
6 # Dave Lerner <dave.lerner@windriver.com>
7 ###############################################################
8 VALGRINDLIB=@libdir@/valgrind
9 LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
10
11 cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \
12     --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \
13     --yocto-ptest 2>&1|tee ${LOG}
14
15 passed=`grep PASS: ${LOG}|wc -l`
16 failed=`grep FAIL: ${LOG}|wc -l`
17 skipped=`grep SKIP: ${LOG}|wc -l`
18 all=$((passed + failed + skipped))
19
20 ( echo "=== Test Summary ==="
21   echo "TOTAL: ${all}"
22   echo "PASSED: ${passed}"
23   echo "FAILED: ${failed}"
24   echo "SKIPPED: ${skipped}"
25 ) | tee -a /${LOG}