nicer cleanup
This commit is contained in:
parent
af0a80d1bd
commit
fad04e1584
32
urchin
32
urchin
@ -422,6 +422,11 @@ format_urchin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# -------------------- Main stuff --------------------
|
# -------------------- Main stuff --------------------
|
||||||
|
|
||||||
|
# Return codes have the following meaning
|
||||||
|
# 0) All tests succeded
|
||||||
|
# 1) At least one test failed.
|
||||||
|
# *) Something else went wrong; Urchin should exit with the same code.
|
||||||
recurse() {
|
recurse() {
|
||||||
requested_path="${1}"
|
requested_path="${1}"
|
||||||
potential_test="$(fullpath "${2}")"
|
potential_test="$(fullpath "${2}")"
|
||||||
@ -450,7 +455,7 @@ recurse() {
|
|||||||
|
|
||||||
if contains "${potential_test}" "${HT}"; then
|
if contains "${potential_test}" "${HT}"; then
|
||||||
echo 'Test file names may not contain tabs (HT).' >&2
|
echo 'Test file names may not contain tabs (HT).' >&2
|
||||||
urchin_exit 11
|
return 11
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -x "${potential_test}" ]; then
|
if [ -x "${potential_test}" ]; then
|
||||||
@ -701,18 +706,25 @@ wantto run urchin on that directory.' >&2
|
|||||||
|
|
||||||
start=$("${epoch}")
|
start=$("${epoch}")
|
||||||
echo "${test_seeds}" | while read seed; do
|
echo "${test_seeds}" | while read seed; do
|
||||||
recurse "${root}" "$(fullpath "${seed}")""${TEST_SHELL}" || break
|
set +e
|
||||||
|
recurse "${root}" "$(fullpath "${seed}")""${TEST_SHELL}"
|
||||||
|
return_code=$?
|
||||||
|
set -e
|
||||||
|
test "${return_code}" -eq 0 || break
|
||||||
done
|
done
|
||||||
finish=$("${epoch}")
|
finish=$("${epoch}")
|
||||||
|
|
||||||
if ! test -f "${urchin_tmp}"/log ; then
|
if test "${return_code}" -eq 0; then
|
||||||
echo 'No tests found' >&2
|
if test -f "${urchin_tmp}"/log ; then
|
||||||
exit_code=2
|
echo Print output.
|
||||||
else
|
# cat "${urchin_tmp}"/head
|
||||||
cat "${urchin_tmp}"/head
|
# report_outcome "${root}" "${format}" "${urchin_tmp}"/log "${start}" \
|
||||||
report_outcome "${root}" "${format}" "${urchin_tmp}"/log "${start}" \
|
# "${finish}"
|
||||||
"${finish}"
|
# cat "${urchin_tmp}"/foot
|
||||||
# cat "${urchin_tmp}"/foot
|
else
|
||||||
|
echo 'No tests found' >&2
|
||||||
|
return_code=2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -Rf "${urchin_tmp}"
|
rm -Rf "${urchin_tmp}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user