forked from Mirrors/flatpak-builder
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>tingping/wmclass
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 || :
|
||||
if test -n "${TEST_SKIP_CLEANUP:-}"; then
|
||||
echo "Skipping cleanup of ${TEST_DATA_DIR}"
|
||||
else
|
||||
rm -rf $TEST_DATA_DIR
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
|
Loading…
Reference in New Issue