mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
test_lightningd.py: don't fail if valgrind turned off.
eg:
test_routing_gossip (__main__.LightningDTests) ... ERROR
======================================================================
ERROR: test_routing_gossip (__main__.LightningDTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/test_lightningd.py", line 150, in tearDown
err_count += self.printValgrindErrors(node)
File "tests/test_lightningd.py", line 137, in printValgrindErrors
errors, fname = self.getValgrindErrors(node)
File "tests/test_lightningd.py", line 132, in getValgrindErrors
with open(error_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/lightning-l106st0a/test_routing_gossip/lightning-1/valgrind-errors'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
811e14ff66
commit
3d2f166364
@@ -128,6 +128,8 @@ class BaseLightningDTests(unittest.TestCase):
|
|||||||
self.node_factory = NodeFactory(self, self.executor)
|
self.node_factory = NodeFactory(self, self.executor)
|
||||||
|
|
||||||
def getValgrindErrors(self, node):
|
def getValgrindErrors(self, node):
|
||||||
|
if not VALGRIND:
|
||||||
|
return None, None
|
||||||
error_file = '{}valgrind-errors'.format(node.daemon.lightning_dir)
|
error_file = '{}valgrind-errors'.format(node.daemon.lightning_dir)
|
||||||
with open(error_file, 'r') as f:
|
with open(error_file, 'r') as f:
|
||||||
errors = f.read().strip()
|
errors = f.read().strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user