As a by-product, this allows us to re-enable abc-cmdline.py as a first-class
test citizen.
Tests which want some outputs verified in their stderr output must call
the expected_stderr() method of BitcoinTestFramework (from which most tests
are derived). An example of how to use can be seen in the adapted abc-cmdline.py .
If tests are run standalone without the wrapper, there is no ability to check
their stderr output. They are now declared as
Tests completed (maybe successful - stderr checks pending)
instead of
Tests successful
By setting PYTHON_DEBUG, it is possible to get output of the expected traces
after the test has run.
We should stick to current paradigm of executing tests through the wrapper
whenever possible.
Technically, the stderr output collection is enabled between wrapper and test
by passing a new --exp-stderr=<file> option with a temporary <file>
to the test. The test collects its expected stderr outputs and writes them to
this temporary file.
When the test terminates, the wrapper compares the produced stderr outputs
to the contents of the temporary file. If they match, there is no problem and
the temporary file is removed.
If there is a mismatch, the temporary file is not removed, for troubleshooting,
and the test causes an overall FAILED.