diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-20 12:35:31 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-05-20 21:13:41 +0200 |
commit | b1fac3dde682d321da01e2fb09e1f015f8c56775 (patch) | |
tree | 100bf7deac29ba9607295d3061e104a6d804ff8c /desktop/scripts | |
parent | e29a17ede22aee2fcc5e17f945c3e69d1927e7c1 (diff) |
desktop: add soffice --record parameter for easy use of rr
Allow recording all JunitTests with "RR=1 make check".
Change-Id: Ie540cb42990d3032d3fa38abedd4e5134f3ded2c
Diffstat (limited to 'desktop/scripts')
-rwxr-xr-x | desktop/scripts/soffice.sh | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 872936805957..06a7ff760644 100755 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -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" "$@" |