New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Create new per-test fixtures #806

wants to merge 2 commits into
base: master


Copy link

Warrows commented Feb 3, 2019

This makes a new basic testing fixture initializing less stuff for most test cases. It also reinitializes the fixture between each test suite.
Backport of bitcoin#5852 and bitcoin#5883.

@Warrows Warrows added this to the Future milestone Feb 3, 2019

@Warrows Warrows self-assigned this Feb 3, 2019

@Warrows Warrows added this to Later in perpetual updating PIVX Core to BTC Core via automation Feb 3, 2019

@Warrows Warrows referenced this pull request Feb 3, 2019


Bring PIVX random on par with bitcoin #799

2 of 49 tasks complete

Mrs-X approved these changes Feb 9, 2019

Copy link

Mrs-X left a comment

That was quite some stuff to review, looks good and utACK from my side.

Will test it later today.

Copy link

Mrs-X left a comment

All tests but one run without problem.
The one with problems always ends with
fatal error in "zerocoin_spend_test": std::runtime_error: boost::filesystem::create_directory: No such file or directory: "/tmp/test_pivx_1549734115_46286/unittest/database" test/zerocoin_denomination_tests.cpp(518): last checkpoint

A quick look showed that the folder unittest is created, but deleted again before this test runs.

sipa and others added some commits Mar 3, 2015

Reinitialize state in between individual unit tests.
This changes the TestingSetup fixture to be per-unit-test rather than global.
Most tests don't need it, so it's only invoked in a few.
tests: add a BasicTestingSetup and apply to all tests
Make sure that chainparams and logging is properly initialized. Doing
this for every test may be overkill, but this initialization is so
simple that that does not matter.

This should fix the travis issues.

@Warrows Warrows force-pushed the Warrows:2019_bitcoin-bp_5883 branch from a72634f to a34127a Feb 14, 2019


This comment has been minimized.

Copy link
Collaborator Author

Warrows commented Feb 14, 2019

I was unable to reproduce the problem but I think these new changes should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment