HomePhabricator

test: Log to debug.log in all tests

Description

test: Log to debug.log in all tests

Summary:

This makes it easier to debug a frozen test or a test that failed. To
debug a failed test, remove the line fs::remove_all(m_path_root);.

The pull is done in three commits:

 - Create a datadir for every unit test once (and only once). This
requires the SetDataDir function to go away.
 - Use the common setup in the gui unit tests. Some of those tests are
testing the init sequence, so we'd have to undo some of what the testing
setup did.
 - Log to the debug.log in all tests

Backport of core PR16252 and PR16289 (bugfix).

Depends on D5553.

This fixes the debug.log failure when running test_bitcoin-qt.exe on Windows.

Test Plan:

ninja check

Check the /tmp/test_common_Bitcoin\ ABC/ dir is created.

Run test_bitcoin-qt.exe on Windows, it should return no error.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jun 19 2019, 21:52
FabienCommitted on Mar 26 2020, 10:25
FabienPushed on Mar 26 2020, 13:37
Reviewer
Restricted Project
Differential Revision
D5556: test: Log to debug.log in all tests
Parents
rSTAGING62c94fd938b2: test: Add test for unknown args
Branches
Unknown
Tags
Unknown