HomePhabricator

Merge #13145: Use common getPath method to create temp directory in tests.

Description

Merge #13145: Use common getPath method to create temp directory in tests.

Summary:
PR13145 backport https://github.com/bitcoin/bitcoin/pull/13145/files
075429a482 Use common SetDataDir method to create temp directory in tests. (winder)

Pull request description:

Took a stab at #12574

Created a `getPath` method which can be used with the `TestingSetup` fixture to create a temp directory. Updated tests using temp directories to use this method.

I tried setting up a `BOOST_GLOBAL_FIXTURE` to create a truly global path for all tests but was getting linker errors when including `boost/test/unit_test.hpp` in `test_bitcoin.cpp`. Even if I had gotten the linking to work, it looks like `make check` invokes the test binary a bunch of times, so it may not have worked anyway.

Backport note: also updates a validation_tests case (ABC-only, from D199)

Test Plan: make check

Reviewers: deadalnix, Fabien, jasonbcox, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jul 12 2018, 11:46
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Committed on Jul 8 2019, 14:23
markblundebergPushed on Jul 8 2019, 14:23
Reviewer
Restricted Project
Differential Revision
D3584: Merge #13145: Use common getPath method to create temp directory in tests.
Parents
rABC816d31b4f1da: Use cstdint in generated test headers
Branches
Unknown
Tags
Unknown