blob: e8a1a668fc5b99e89a8baee9cfd0b5f528346932 [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"
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060015EXP_TOOLS="exp-bbv"
Brad Bishopa34c0302019-09-23 22:34:48 -040016
17GDB_BIN=@bindir@/gdb
18cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN}
19
Andrew Geisslerd1e89492021-02-12 15:35:20 -060020echo "Hide valgrind tests that are non-deterministic"
21echo "Reported at https://bugs.kde.org/show_bug.cgi?id=430321"
22for i in `cat remove-for-all`; do
23 mv $i.vgtest $i.IGNORE;
24done
25
Brad Bishopa34c0302019-09-23 22:34:48 -040026arch=`arch`
27if [ "$arch" = "aarch64" ]; then
28 echo "Aarch64: Hide valgrind tests that result in defunct process and then out of memory"
29 for i in `cat remove-for-aarch64`; do
30 mv $i.vgtest $i.IGNORE;
31 done
32fi
33
34cd ${VALGRIND_LIB}/ptest && ./tests/vg_regtest \
35 --valgrind=${VALGRIND_BIN} \
36 --valgrind-lib=${VALGRIND_LIB} \
37 --yocto-ptest \
38 gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
39 2>&1|tee ${LOG}
40
41cd ${VALGRIND_LIB}/ptest && \
42 ./tests/post_regtest_checks $(pwd) \
43 gdbserver_tests ${TOOLS} ${EXP_TOOLS} \
44 2>&1|tee -a ${LOG}
45
46if [ "$arch" = "aarch64" ]; then
47 echo "Aarch64: Restore valgrind tests that result in defunct process and then out of memory"
48 for i in `cat remove-for-aarch64`; do
49 mv $i.IGNORE $i.vgtest;
50 done
51fi
52
Andrew Geisslerd1e89492021-02-12 15:35:20 -060053echo "Restore valgrind tests that are non-deterministc"
54for i in `cat remove-for-all`; do
55 mv $i.IGNORE $i.vgtest;
56done
Brad Bishopd7bf8c12018-02-25 22:55:05 -050057
58passed=`grep PASS: ${LOG}|wc -l`
59failed=`grep FAIL: ${LOG}|wc -l`
60skipped=`grep SKIP: ${LOG}|wc -l`
61all=$((passed + failed + skipped))
62
63( echo "=== Test Summary ==="
64 echo "TOTAL: ${all}"
65 echo "PASSED: ${passed}"
66 echo "FAILED: ${failed}"
67 echo "SKIPPED: ${skipped}"
68) | tee -a /${LOG}