run-ptest 1.7 KB

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