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.