Browse Source

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>
ppa-0.6.1
Rusty Russell 8 years ago
committed by Christian Decker
parent
commit
3d2f166364
  1. 2
      tests/test_lightningd.py

2
tests/test_lightningd.py

@ -128,6 +128,8 @@ class BaseLightningDTests(unittest.TestCase):
self.node_factory = NodeFactory(self, self.executor)
def getValgrindErrors(self, node):
if not VALGRIND:
return None, None
error_file = '{}valgrind-errors'.format(node.daemon.lightning_dir)
with open(error_file, 'r') as f:
errors = f.read().strip()

Loading…
Cancel
Save