Skip to content

Commit

Permalink
added TEST_KEEPDIR to preserve testing dirs for passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic committed Aug 12, 2021
1 parent 386afeb commit 6afd234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/pyln-testing/pyln/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def directory(request, test_base_dir, test_name):
outcome = 'passed' if rep_call is None else rep_call.outcome
failed = not outcome or request.node.has_errors or outcome != 'passed'

if not failed:
if not failed and not bool(int(os.getenv('TEST_KEEPDIR', '0'))):
try:
shutil.rmtree(directory)
except (OSError, Exception):
Expand Down

0 comments on commit 6afd234

Please sign in to comment.