blob: 97b0a85dbff1fede864d14f8823e5acdd9af283f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#!/bin/sh
2
3# run-ptest - 'ptest' test infrastructure shell script that
4# wraps the valgrind regression script vg_regtest.
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005#
6# Dave Lerner <dave.lerner@windriver.com>
Brad Bishopa34c0302019-09-23 22:34:48 -04007# Randy MacLeod <Randy.MacLeod@windriver.com>
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008###############################################################
Brad Bishopa34c0302019-09-23 22:34:48 -04009VALGRIND_LIB=@libdir@/valgrind
10VALGRIND_BIN=@bindir@/valgrind
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011
Brad Bishopa34c0302019-09-23 22:34:48 -040012LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log"
13
14TOOLS="memcheck cachegrind callgrind helgrind drd massif dhat lackey none"
15EXP_TOOLS="exp-bbv exp-dhat exp-sgcheck"
16
17GDB_BIN=@bindir@/gdb
18cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN}
19
20arch=`arch`
21if [ "$arch" = "aarch64" ]; then
22 echo "Aarch64: Hide valgrind tests that result in defunct process and then out of memory"
23 for i in `cat remove-for-aarch64`; do
24 mv $i.vgtest $i.IGNORE;
25 done
26fi
27
28cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
29 --valgrind=${VALGRIND_BIN} \
30 --valgrind-lib=${VALGRIND_LIB} \
31 --yocto-ptest \
32 gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
33 2>&1|tee ${LOG}
34
35cd ${VALGRIND_LIB}/ptest && \
36 ./tests/post_regtest_checks $(pwd) \
37 gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
38 2>&1|tee -a ${LOG}
39
40if [ "$arch" = "aarch64" ]; then
41 echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory"
42 for i in `cat remove-for-aarch64`; do
43 mv $i.IGNORE $i.vgtest;
44 done
45fi
46
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047
48passed=`grep PASS: ${LOG}|wc -l`
49failed=`grep FAIL: ${LOG}|wc -l`
50skipped=`grep SKIP: ${LOG}|wc -l`
51all=$((passed + failed + skipped))
52
53( echo "=== Test Summary ==="
54 echo "TOTAL: ${all}"
55 echo "PASSED: ${passed}"
56 echo "FAILED: ${failed}"
57 echo "SKIPPED: ${skipped}"
58) | tee -a /${LOG}