Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # run-ptest - 'ptest' test infrastructure shell script that |
| 4 | # wraps the valgrind regression script vg_regtest. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | # |
| 6 | # Dave Lerner <dave.lerner@windriver.com> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 7 | # Randy MacLeod <Randy.MacLeod@windriver.com> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | ############################################################### |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 9 | VALGRIND_LIB=@libdir@/valgrind |
| 10 | VALGRIND_BIN=@bindir@/valgrind |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 12 | LOG="${VALGRIND_LIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" |
| 13 | |
| 14 | TOOLS="memcheck cachegrind callgrind helgrind drd massif dhat lackey none" |
| 15 | EXP_TOOLS="exp-bbv exp-dhat exp-sgcheck" |
| 16 | |
| 17 | GDB_BIN=@bindir@/gdb |
| 18 | cd ${VALGRIND_LIB}/ptest && ./gdbserver_tests/make_local_links ${GDB_BIN} |
| 19 | |
| 20 | arch=`arch` |
| 21 | if [ "$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 |
| 26 | fi |
| 27 | |
| 28 | cd ${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 | |
| 35 | cd ${VALGRIND_LIB}/ptest && \ |
| 36 | ./tests/post_regtest_checks $(pwd) \ |
| 37 | gdbserver_tests ${TOOLS} ${EXP_TOOLS} \ |
| 38 | 2>&1|tee -a ${LOG} |
| 39 | |
| 40 | if [ "$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 |
| 45 | fi |
| 46 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 47 | |
| 48 | passed=`grep PASS: ${LOG}|wc -l` |
| 49 | failed=`grep FAIL: ${LOG}|wc -l` |
| 50 | skipped=`grep SKIP: ${LOG}|wc -l` |
| 51 | all=$((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} |