Page MenuHomePhabricator

streamline utility tests to not depend on main headers
AbandonedPublic

Authored by markblundeberg on May 1 2019, 14:00.

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Summary

Many tests don't actually need test_bitcoin.h, and are unnecessarily
recompiled every time a main program header gets changed.

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
streamlinetest
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5635
Build 9332: Bitcoin ABC Buildbot (legacy)
Build 9331: arc lint + arc unit

Event Timeline

(This is just an example -- I can expand this Diff to affect numerous other tests)

jasonbcox requested changes to this revision.May 1 2019, 23:33
jasonbcox added a subscriber: jasonbcox.

concept ack, but for this diff to make it, either reword the title to match only this file or update the diff for the rest of the cases. up to you.

This revision now requires changes to proceed.May 1 2019, 23:33

Note from @dagurval on the slack--

This causes a crash if anyone introduces a test that runs code depending on global vars such as ChainParams()
And only when ran directly (test_bitcoin -t bech32_tests for example)

With some tests it seems 'totally obvious' that this would not happen, but it does make me a bit nervous.

Abandoning this concept. In fact the BasicTestingSetup constructor sets up several important things.