diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-08-20 21:21:28 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 12:06:51 +0100 |
commit | e6b7734d769e25a0f37384d1e6d84fb350aa5a1c (patch) | |
tree | 5f11feb1610e944725e2c684e8f05e8f1d4f02cf | |
parent | ee8b56528dacf9b2821d537074fa40ad2d1baa7a (diff) | |
download | poky-e6b7734d769e25a0f37384d1e6d84fb350aa5a1c.tar.gz |
valgrind: improvements for run-ptest
* Add statistic summary for run-ptest
* Ensure the script can be run anywhere
(From OE-Core rev: 8a6f5a2bc55975f38ad285ddea7122643b303c53)
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | meta/recipes-devtools/valgrind/valgrind/run-ptest | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/run-ptest b/meta/recipes-devtools/valgrind/valgrind/run-ptest index f9a72ec4a9..447d33c8cb 100755 --- a/meta/recipes-devtools/valgrind/valgrind/run-ptest +++ b/meta/recipes-devtools/valgrind/valgrind/run-ptest | |||
@@ -2,11 +2,24 @@ | |||
2 | 2 | ||
3 | # run-ptest - 'ptest' test infrastructure shell script that | 3 | # run-ptest - 'ptest' test infrastructure shell script that |
4 | # wraps the valgrind regression script vg_regtest. | 4 | # wraps the valgrind regression script vg_regtest. |
5 | # Must be run in the /usr/lib/valgrind/ptest directory. | ||
6 | # | 5 | # |
7 | # Dave Lerner <dave.lerner@windriver.com> | 6 | # Dave Lerner <dave.lerner@windriver.com> |
8 | ############################################################### | 7 | ############################################################### |
9 | VALGRINDLIB=@libdir@/valgrind | 8 | VALGRINDLIB=@libdir@/valgrind |
10 | tests/vg_regtest --all \ | 9 | LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" |
10 | |||
11 | cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \ | ||
11 | --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \ | 12 | --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \ |
12 | --yocto-ptest | 13 | --yocto-ptest 2>&1|tee ${LOG} |
14 | |||
15 | passed=`grep PASS: ${LOG}|wc -l` | ||
16 | failed=`grep FAIL: ${LOG}|wc -l` | ||
17 | skipped=`grep SKIP: ${LOG}|wc -l` | ||
18 | all=$((passed + failed + skipped)) | ||
19 | |||
20 | ( echo "=== Test Summary ===" | ||
21 | echo "TOTAL: ${all}" | ||
22 | echo "PASSED: ${passed}" | ||
23 | echo "FAILED: ${failed}" | ||
24 | echo "SKIPPED: ${skipped}" | ||
25 | ) | tee -a /${LOG} | ||