mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-14 13:15:35 -04:00
tests: Add TEST_SKIP_CLEANUP env var for skipping test cleanup
This mirrors the same environment variable in OSTree’s unit tests, which keeps the temporary directory around after tests have completed (or failed) so the developer can examine it. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
committed by
Alexander Larsson
parent
ceccd281c3
commit
0062cf69c0
@@ -295,6 +295,10 @@ cleanup () {
|
||||
/bin/kill $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-}
|
||||
gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true
|
||||
fusermount -u $XDG_RUNTIME_DIR/doc || :
|
||||
rm -rf $TEST_DATA_DIR
|
||||
if test -n "${TEST_SKIP_CLEANUP:-}"; then
|
||||
echo "Skipping cleanup of ${TEST_DATA_DIR}"
|
||||
else
|
||||
rm -rf $TEST_DATA_DIR
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
Reference in New Issue
Block a user