Skip to content

Commit 6afd234

Browse files
committed
added TEST_KEEPDIR to preserve testing dirs for passing tests
1 parent 386afeb commit 6afd234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pyln-testing/pyln/testing/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def directory(request, test_base_dir, test_name):
9191
outcome = 'passed' if rep_call is None else rep_call.outcome
9292
failed = not outcome or request.node.has_errors or outcome != 'passed'
9393

94-
if not failed:
94+
if not failed and not bool(int(os.getenv('TEST_KEEPDIR', '0'))):
9595
try:
9696
shutil.rmtree(directory)
9797
except (OSError, Exception):

0 commit comments

Comments
 (0)