Skip to content
Snippets Groups Projects
Commit 3dd3632f authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Add the ability to keep temporary directories

parent 80141af7
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -18,3 +18,7 @@ At this point gdb does not yet know about dlmopen()ed DSOs and their
symbols, so debugging a libcapsule proxy library with gdb isn't very
convenient. It's on the list of things to fix.
If you are debugging the unit tests, you might want to set
CAPSULE_TESTS_KEEP_TEMP to a non-empty value so temporary
directories will not be cleaned up. See tests/CapsuleTest.pm
or `perldoc -F tests/CapsuleTest.pm` for more details.
......@@ -142,6 +142,23 @@ sub skip_all_unless_bwrap {
=back
=head1 ENVIRONMENT
=over
=item CAPSULE_TESTS_KEEP_TEMP
If set to a non-empty value, temporary directories created by this test
will not be cleaned up.
=cut
if (length $ENV{CAPSULE_TESTS_KEEP_TEMP}) {
$File::Temp::KEEP_ALL = 1;
}
=back
=head1 SEE ALSO
B<Test::More>(3pm), B<bwrap>(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment