提交 2002a76f 编写于 作者: C Cleber Rosa

Wrappers: add support for rr

This example wrapper script runs binaries inside rr (record), which
saves the execution environment, allowing to deterministically debug
possible failures later.

The usage instructions to run tests with this wrapper are no different
than other wrappers.  The effect of the wrapper, though, deserves notice:
it creates an "rr" directory inside the test results, which rr uses
to save its data files.

Replays should be executed like this:

 $ rr replay $JOB-RESULTS/test-results/$TEST/data/rr/$BINARY_NUMBER

Where $BINARY_NUMBER is the "Nth" execution of "binary" by your
test.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 e12bcfe1
......@@ -15,6 +15,13 @@ other:
other types of commands. This requires a test written with that
approach and API in mind.
.. tip:: Even though this section describes the use of the Avocado GDB
features, which allow live debugging of binaries inside Avocado
tests, it's also possible to debug some application offline by
using tools such as `rr <http://rr-project.org>`_. Avocado ships
with an example wrapper script (to be used with ``--wrapper``) for
that purpose.
Transparent Execution of Executables
------------------------------------
......
#!/bin/bash
#
# Record deterministic execution using rr (http://rr-project.org)
#
export _RR_TRACE_DIR=$AVOCADO_TEST_OUTPUTDIR/rr
mkdir -p $_RR_TRACE_DIR
exec rr record -n "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册