Kaydet (Commit) b1fac3dd authored tarafından Michael Stahl's avatar Michael Stahl

desktop: add soffice --record parameter for easy use of rr

Allow recording all JunitTests with "RR=1 make check".

Change-Id: Ie540cb42990d3032d3fa38abedd4e5134f3ded2c
üst e29a17ed
......@@ -64,14 +64,28 @@ fi
GDBTRACECHECK=
STRACECHECK=
VALGRINDCHECK=
RRCHECK=
# count number of selected checks; only one is allowed
checks=
EXTRAOPT=
# force the --valgrind option if the VALGRIND variable is set
test -n "$VALGRIND" && VALGRINDOPT="--valgrind" || VALGRINDOPT=
test -n "$VALGRIND" && EXTRAOPT="--valgrind"
for arg in $@ $VALGRINDOPT ; do
# force the --record option if the RR variable is set
test -n "$RR" && EXTRAOPT="--record"
for arg in $@ $EXTRAOPT ; do
case "$arg" in
--record)
if which rr >/dev/null 2>&1 ; then
RRCHECK="rr record"
checks="c$checks"
else
echo "Error: Can't find the tool \"rr\", --record option will be ignored."
exit 1
fi
;;
--backtrace)
if which gdb >/dev/null 2>&1 ; then
GDBTRACECHECK="gdb -nx --command=$sd_prog/gdbtrace --args"
......@@ -122,7 +136,7 @@ for arg in $@ $VALGRINDOPT ; do
done
if echo "$checks" | grep -q "cc" ; then
echo "Error: The debug options --backtrace, --strace, and --valgrind cannot be used together."
echo "Error: The debug options --record, --backtrace, --strace, and --valgrind cannot be used together."
echo " Please, use them one by one."
exit 1;
fi
......@@ -158,4 +172,4 @@ if [ -n "$VALGRINDCHECK" -a -z "$VALGRIND" ] ; then
fi
# oosplash does the rest: forcing pages in, javaldx etc. are
exec $VALGRINDCHECK $STRACECHECK "$sd_prog/oosplash" "$@"
exec $RRCHECK $VALGRINDCHECK $STRACECHECK "$sd_prog/oosplash" "$@"
......@@ -486,6 +486,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
// primitive tools that /bin/sh offers, ignore them here
if (
#if defined UNX
oArg != "record" &&
oArg != "backtrace" &&
oArg != "strace" &&
oArg != "valgrind" &&
......
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