FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:35:07 2017 +0000
Revision:
0:a2cb7295a1f7
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ram54288 0:a2cb7295a1f7 1 #!/bin/bash
ram54288 0:a2cb7295a1f7 2 # Execute script with root path where to find binaries.
ram54288 0:a2cb7295a1f7 3 # For example ./run_unit_tests_with_valgrind.sh ./build/x86-linux-native-coverage/test/mbedclient/
ram54288 0:a2cb7295a1f7 4
ram54288 0:a2cb7295a1f7 5 input="binaries.txt"
ram54288 0:a2cb7295a1f7 6 valgrind_logs="valgrind_logs"
ram54288 0:a2cb7295a1f7 7 rm -rf $valgrind_logs
ram54288 0:a2cb7295a1f7 8 mkdir $valgrind_logs
ram54288 0:a2cb7295a1f7 9 find $1 -type f -executable -exec sh -c "file -i '{}' | grep -q 'x-executable; charset=binary'" \; -print > $input
ram54288 0:a2cb7295a1f7 10 while file= read -r binary
ram54288 0:a2cb7295a1f7 11 do
ram54288 0:a2cb7295a1f7 12 valgrind --track-origins=yes --xml=yes --xml-file="${valgrind_logs}/valgrind_$(basename $binary).xml" "$binary"
ram54288 0:a2cb7295a1f7 13
ram54288 0:a2cb7295a1f7 14 done < "$input"