Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Cleanup test files on Windows after executing test binary #1910
The test results on Windows include a lot of noise after most tests:
These temporary folders can build up after time (many GB in my case). In particular the files which are still held are the logging file and the store/wallet store database files. The logger is set up as a singleton for the duration of the program, so is not easily closed. It's also a nightmare trying to stop the store/wallet store in
An option would be to change all test to use test fixtures and make use of the
Not very ideal, but it would mean all platforms would clean up correctly after each test is run. I will leave this option open for debate.
For now, I've implemented conditional compilation so that on Windows the cleaning up only happens at the end of the test executable. This does mean that early exiting in any test will not clean up any proceeding but it seems better than nothing (and also removes the noisey output). The other platforms remain unchanged.