Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-client/mbed-client-classic/run_unit_tests_with_valgrind.sh@0:06ee5f8a484a, 2017-03-18 (annotated)
- Committer:
- djmeyers
- Date:
- Sat Mar 18 22:37:16 2017 +0000
- Revision:
- 0:06ee5f8a484a
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| djmeyers | 0:06ee5f8a484a | 1 | #!/bin/bash |
| djmeyers | 0:06ee5f8a484a | 2 | # Execute script with root path where to find binaries. |
| djmeyers | 0:06ee5f8a484a | 3 | # For example ./run_unit_tests_with_valgrind.sh ./build/x86-linux-native-coverage/test/mbedclient/ |
| djmeyers | 0:06ee5f8a484a | 4 | |
| djmeyers | 0:06ee5f8a484a | 5 | input="binaries.txt" |
| djmeyers | 0:06ee5f8a484a | 6 | valgrind_logs="valgrind_logs" |
| djmeyers | 0:06ee5f8a484a | 7 | rm -rf $valgrind_logs |
| djmeyers | 0:06ee5f8a484a | 8 | mkdir $valgrind_logs |
| djmeyers | 0:06ee5f8a484a | 9 | find $1 -type f -executable -exec sh -c "file -i '{}' | grep -q 'x-executable; charset=binary'" \; -print > $input |
| djmeyers | 0:06ee5f8a484a | 10 | while file= read -r binary |
| djmeyers | 0:06ee5f8a484a | 11 | do |
| djmeyers | 0:06ee5f8a484a | 12 | valgrind --track-origins=yes --xml=yes --xml-file="${valgrind_logs}/valgrind_$(basename $binary).xml" "$binary" |
| djmeyers | 0:06ee5f8a484a | 13 | |
| djmeyers | 0:06ee5f8a484a | 14 | done < "$input" |