Port the latest version of valgrind
[AGL/meta-agl.git] / meta-agl-profile-core / recipes-devtools / valgrind / valgrind / run-ptest
diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest
new file mode 100755 (executable)
index 0000000..447d33c
--- /dev/null
@@ -0,0 +1,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}