HomePhabricator

Generalized ibd.sh to provide a logging tool for running similar types of tests

Authored by jasonbcox on Thu, Sep 5, 17:35.

Description

Generalized ibd.sh to provide a logging tool for running similar types of tests

Summary:
This generalized script is useful for running tests on bitcoind "to completion" where
the indication of such comes from looking at the logs.

Test Plan:

./bitcoind-exit-on-log.sh -h  # shows help message
./bitcoind-exit-on-log.sh --grep "Loading banlist"  # success
LOG_FILE=~/.bitcoin/testnet3/debug.log ./bitcoind-exit-on-log.sh --grep "Loading banlist" --params "-testnet"  # success

mycallback(){ ./bitcoin-cli getbestblockhash; }
export -f mycallback
./bitcoind-exit-on-log.sh --grep "Leaving InitialBlockDownload" --callback mycallback  # success, with best block hash output

Also test IBD on this diff via TeamCity.

Reviewers: #bitcoin_abc, deadalnix, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Committed
jasonbcoxWed, Sep 11, 17:05
Pushed
jasonbcoxWed, Sep 11, 17:05
Reviewer
Restricted Project
Differential Revision
D4003: Generalized ibd.sh to provide a logging tool for running similar types of tests
Parents
rABC0be377a50ccc: Modify ContextualCheckBlockHeader to accept a CChainParam rather than a Config
Branches
Unknown
Tags
Unknown