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