aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-10-04 03:07:01 -0400
committerMarcoFalke <falke.marco@gmail.com>2017-11-03 10:07:59 -0400
commit1c8c7f8af926175896cfd0d0e8b8b8663f863505 (patch)
tree4b395eb114581b6823c9ed189dd9ea44f90a3ea7
parent1036c43fe506e866419b2554c1279c97ec4a8003 (diff)
downloadbitcoin-1c8c7f8af926175896cfd0d0e8b8b8663f863505.tar.xz
Add missing batch rpc calls to python coverage logs
Without this change, batch RPC calls are not included in coverage logs. Github-Pull: #11277 Rebased-From: 74182f235cd04dcac7a8b3e763bc9add549745e1
-rw-r--r--test/functional/test_framework/coverage.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/functional/test_framework/coverage.py b/test/functional/test_framework/coverage.py
index 8101775ce1..84049e76bc 100644
--- a/test/functional/test_framework/coverage.py
+++ b/test/functional/test_framework/coverage.py
@@ -45,18 +45,24 @@ class AuthServiceProxyWrapper(object):
"""
return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
+ self._log_call()
+ return return_val
+
+ def _log_call(self):
rpc_method = self.auth_service_proxy_instance._service_name
if self.coverage_logfile:
with open(self.coverage_logfile, 'a+', encoding='utf8') as f:
f.write("%s\n" % rpc_method)
- return return_val
-
def __truediv__(self, relative_uri):
return AuthServiceProxyWrapper(self.auth_service_proxy_instance / relative_uri,
self.coverage_logfile)
+ def get_request(self, *args, **kwargs):
+ self._log_call()
+ return self.auth_service_proxy_instance.get_request(*args, **kwargs)
+
def get_filename(dirname, n_node):
"""
Get a filename unique to the test process ID and node.