FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:37:05 2017 +0000
Revision:
0:dbad57390bd1
Initial commit

Who changed what in which revision?

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