HomePhabricator

[Tests] Suppress output in test_bitcoin for expected errors

Description

[Tests] Suppress output in test_bitcoin for expected errors

Summary:

This adds two methods to noui, that allows temporarily suppressing (and
then resuming) the output from noui. For situations where errors are
expected, it's confusing for the test binary to output an error and then
conclude with No errors detected.

It also uses this supress/reconnect in the tests that currently produce
verbose errors when running test_bitcoin.

Backport of core PR16277.

Depends on D5050 (for the test plan) and D5052.

Test Plan:

ninja test_bitcoin
./src/test/test_bitcoin --log_level=message

Check the -walletdir error messages (from D5004) are no longer printed
to console.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5053

Details

Provenance
Gert-Jaap Glasbergen <gertjaap@gertjaap.org>Authored on Jun 24 2019, 15:14
FabienCommitted on Jan 27 2020, 08:51
FabienPushed on Jan 27 2020, 11:08
Reviewer
Restricted Project
Differential Revision
D5053: [Tests] Suppress output in test_bitcoin for expected errors
Parents
rSTAGING6c6c08de32b2: Add an option to set the functional test suite name
Branches
Unknown
Tags
Unknown