summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind/run-ptest
blob: 447d33c8cb8de67d029012e44f3aa03721e754ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# run-ptest - 'ptest' test infrastructure shell script that
#   wraps the valgrind regression script vg_regtest. 
#
# Dave Lerner <dave.lerner@windriver.com>
###############################################################
VALGRINDLIB=@libdir@/valgrind
LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"

cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \
    --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \
    --yocto-ptest 2>&1|tee ${LOG}

passed=`grep PASS: ${LOG}|wc -l`
failed=`grep FAIL: ${LOG}|wc -l`
skipped=`grep SKIP: ${LOG}|wc -l`
all=$((passed + failed + skipped))

( echo "=== Test Summary ==="
  echo "TOTAL: ${all}"
  echo "PASSED: ${passed}"
  echo "FAILED: ${failed}"
  echo "SKIPPED: ${skipped}"
) | tee -a /${LOG}