提交 5150fe9d 编写于 作者: L Lucas Meneghel Rodrigues

Merge pull request #310 from ruda/update_wrapper_scripts

Update wrapper scripts
#!/bin/bash
#
# Just exec the process.
#
exec -- $@
exec -- "$@"
#!/bin/bash
#
# Run process inside ltrace.
#
set -e
# Map interesting signals to exit codes (see kill -L)
# Example: SIGHUP (kill -1) 128+1 = 129
......@@ -30,16 +35,16 @@ signal_map[SIGPWR]=158
signal_map[SIGSYS]=159
signal_map[UNKNOWN_SIGNAL]=160
ltrace -f -o $AVOCADO_TEST_LOGDIR/ltrace.log.$$ -- $@
signal_name=$(sed -ne 's/^.*+++ killed by \([A-Z_]\+\) +++$/\1/p' $AVOCADO_TEST_LOGDIR/ltrace.log.$$)
if [ -n "$signal_name" ] ; then
exit ${signal_map[$signal_name]}
fi
ltrace -f -o $AVOCADO_TEST_LOGDIR/ltrace.log.$$ -- "$@"
exit_status=$(sed -ne 's/^.*+++ exited (status \([0-9]\+\)) +++$/\1/p' $AVOCADO_TEST_LOGDIR/ltrace.log.$$)
exit_status=$(sed -ne 's/^[0-9]\+ +++ exited (status \([0-9]\+\)) +++$/\1/p' $AVOCADO_TEST_LOGDIR/ltrace.log.$$ | tail -1)
if [ -n "$exit_status" ] ; then
exit $exit_status
fi
signal_name=$(sed -ne 's/^[0-9]\+ +++ killed by \([A-Z_]\+\) +++$/\1/p' $AVOCADO_TEST_LOGDIR/ltrace.log.$$ | tail -1)
if [ -n "$signal_name" ] ; then
exit ${signal_map[$signal_name]}
fi
exit 0
#!/bin/bash
#
# Record process information with perf.
#
exec perf record -o $AVOCADO_TEST_LOGDIR/perf.data.$$ -- $@
exec perf record \
--quiet \
-o $AVOCADO_TEST_LOGDIR/perf.data.$$ -- "$@"
#!/bin/bash
#
# Run process inside strace.
#
exec strace -ff -o $AVOCADO_TEST_LOGDIR/strace.log -- $@
exec strace -ff -o $AVOCADO_TEST_LOGDIR/strace.log -- "$@"
#!/bin/bash
#
# Run process inside time.
#
exec /usr/bin/time -o $AVOCADO_TEST_LOGDIR/time.log.$$ -- "$@"
#!/bin/bash
#
# Run process inside valgrind's memcheck.
#
valgrind \
exec valgrind \
--tool=memcheck \
--verbose \
--trace-children=yes \
--leak-check=full \
--log-file=$AVOCADO_TEST_LOGDIR/valgrind.log.$$ -- $@
--log-file=$AVOCADO_TEST_LOGDIR/valgrind.log.$$ -- "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册