HomePhabricator

[devtools] Use -daemon instead of backgrounding bitcoind

Description

[devtools] Use -daemon instead of backgrounding bitcoind

Summary:
Since the behavior change in -printtoconsole, our IBD tests in CI
vomit everything into the Teamcity logs, making them difficult to navigate in
a browser.

This patch daemonizes bitcoind instead of putting it in the background so that
logs only get written to a file. The file is part of the build artifacts,
so it can still be inspected if need be.

One minor downside of doing it this way is that bitcoind's exit code is no
longer accessible to this script. Since the log file is available, that shouldn't
matter too much.

Depends on D6378

Test Plan:
Should complete successfully:

./bitcoind-exit-on-log.sh --grep 'New outbound peer connected' --params "-datadir=/home/jasonbcox/.bitcoin"
ps aux | grep bitcoind    # verify no subprocesses are still running

Run the above again, but Ctrl+C it before it finishes. Again, verify no dangling processes.

Run IBD in CI.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
jasonbcoxAuthored on Jun 4 2020, 21:29
jasonbcoxPushed on Jun 5 2020, 17:55
Reviewer
Restricted Project
Differential Revision
D6379: [devtools] Use -daemon instead of backgrounding bitcoind
Parents
rABC109fb473d256: [backport#16898] test: Reformat python imports to aid scripted diff
Branches
Unknown
Tags
Unknown