Kaydet (Commit) 8e0d758f authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Hint how to use Dr.Memory for unit tests / memory checking.

Change-Id: I7df8716e90e9097336919d2a9208a549b8f7d3d0
üst 684aec54
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment