diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2014-10-23 13:11:20 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2014-10-24 11:27:22 -0400 |
commit | ec01243c14294c0e6f25d093156aae6b4458466e (patch) | |
tree | 32e3569d9622ca9669a82bb4d0c9724374210ff6 /qa | |
parent | c47b9c7ba7c23739fee26f11a98d673e6e34eb5f (diff) |
--tracerpc option for regression tests
Run tests with --tracerpc and all RPC calls will dump to the console.
Very helpful for debugging.
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/rpc-tests/test_framework.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py index 5a18556655..bd20d4c9fe 100755 --- a/qa/rpc-tests/test_framework.py +++ b/qa/rpc-tests/test_framework.py @@ -48,9 +48,15 @@ class BitcoinTestFramework(object): help="Source directory containing bitcoind/bitcoin-cli (default: %default%)") parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"), help="Root directory for datadirs") + parser.add_option("--tracerpc", dest="trace_rpc", default=False, action="store_true", + help="Print out all RPC calls as they are made") self.add_options(parser) (self.options, self.args) = parser.parse_args() + if self.options.trace_rpc: + import logging + logging.basicConfig(level=logging.DEBUG) + os.environ['PATH'] = self.options.srcdir+":"+os.environ['PATH'] check_json_precision() |