I am using boost-test for my unit tests.

Typical unit test jamfile looks something like this:

import testing ;

unit-test eos-strategy-tests
:   [ glob *.cpp ]
    ..//strategy
    /cay/test
: <testing.launcher>"valgrind --leak-check=full --track-origins=yes --error-exitcode=1 --quiet"
;

When building, everything written to stdout when running the tests is displayed in the build output.

I would like to configure it so that stdout is written to a file, and on a test failure, cat the file.

Is this possible?

TIA
Steve