tests: Remove unnecessary nesting

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-06-28 10:51:57 +01:00
parent 97979be1c9
commit 165bbf9647

View File

@@ -40,10 +40,9 @@ touch "${tempdir}/.testtmp"
function cleanup () {
if test -n "${TEST_SKIP_CLEANUP:-}"; then
echo "Skipping cleanup of ${test_tmpdir}"
else if test -f "${tempdir}/.test"; then
elif test -f "${tempdir}/.test"; then
rm "${tempdir}" -rf
fi
fi
}
trap cleanup EXIT
cd "${tempdir}"