diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-03-19 15:35:04 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-03-19 18:11:56 +0100 |
commit | 8e0d758f852b0b4e4242b7fb2ebee8cbd17fc2f4 (patch) | |
tree | 04898590a56464c909d5275ed8cdbf7ab81a6d52 /solenv/bin | |
parent | 684aec5496f7394969743614cfda12b11c0466af (diff) |
Hint how to use Dr.Memory for unit tests / memory checking.
Change-Id: I7df8716e90e9097336919d2a9208a549b8f7d3d0
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/unittest-failed.sh | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/solenv/bin/unittest-failed.sh b/solenv/bin/unittest-failed.sh index 6bbd458cc263..b1e93d5267aa 100755 --- a/solenv/bin/unittest-failed.sh +++ b/solenv/bin/unittest-failed.sh @@ -17,27 +17,28 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . -cat << EOF - -Error: a unit test failed, please do one of: +ECHECKING='export DEBUGCPPUNIT=TRUE # for exception catching' +DEBUGGING= +MCHECKING='export VALGRIND=memcheck # for memory checking' -export DEBUGCPPUNIT=TRUE # for exception catching -EOF if [ "$3" = "WNT" ]; then -cat << EOF -export CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio -EOF + ECHECKING='export DEBUGCPPUNIT=TRUE # for exception catching' + DEBUGGING='export CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio' + MCHECKING='export CPPUNITTRACE="drmemory -free_max_frames 20" # for memory checking (install Dr.Memory first)' elif [ "$3" = "MACOSX" ]; then -cat << EOF -export CPPUNITTRACE="lldb --" # for interactive debugging on OS X -EOF + DEBUGGING='export CPPUNITTRACE="lldb --" # for interactive debugging on OS X' else -cat << EOF -export CPPUNITTRACE="gdb --args" # for interactive debugging on Linux -EOF + DEBUGGING='export CPPUNITTRACE="gdb --args" # for interactive debugging on Linux' fi + +# print the actual error message cat << EOF -export VALGRIND=memcheck # for memory checking + +Error: a unit test failed, please do one of: + +$ECHECKING +$DEBUGGING +$MCHECKING and retry using: make $1Test_$2 |