test_lightning.py: don't get confused by valgrind core files.

I run with ulimit -c unlimited, and valgrind leaves core files like
valgrind-errors.22114.core.22114 which test_lightning.py tries to
parse as log files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-10-31 10:35:08 +10:30
parent bc9918ad46
commit 390bf6359e

View File

@@ -153,7 +153,7 @@ class BaseLightningDTests(unittest.TestCase):
def getValgrindErrors(self, node):
for error_file in os.listdir(node.daemon.lightning_dir):
if not re.match("valgrind-errors.\d+", error_file):
if not re.fullmatch("valgrind-errors.\d+", error_file):
continue;
with open(os.path.join(node.daemon.lightning_dir, error_file), 'r') as f:
errors = f.read().strip()