relative potential test in log file

This commit is contained in:
Thomas Levine 2016-04-10 16:49:14 +00:00
parent 246f29f06c
commit 22e9f57f0f

12
urchin
View File

@ -309,6 +309,8 @@ recurse() {
cycle_shell="${3}" cycle_shell="${3}"
TEST_SHELL="${4}" TEST_SHELL="${4}"
root="$(urchin_root "${1}")"
for ignore in setup_dir teardown_dir setup teardown; do for ignore in setup_dir teardown_dir setup teardown; do
if test "$(basename "${potential_test}")" = "${ignore}"; then if test "$(basename "${potential_test}")" = "${ignore}"; then
return return
@ -418,7 +420,8 @@ recurse() {
fi fi
elapsed=$(($finish - $start)) elapsed=$(($finish - $start))
printf "${potential_test}\t${the_test_shell}\t${result}\t${elapsed}\n" \ rel="${potential_test##"${root}/"}"
printf "${rel}\t${the_test_shell}\t${result}\t${elapsed}\n" \
>> "${urchin_tmp}"/log >> "${urchin_tmp}"/log
exit "${exit_code}" exit "${exit_code}"
) & ) &
@ -446,13 +449,12 @@ recurse() {
# This should not require the root variable; fix the paths before they # This should not require the root variable; fix the paths before they
# get to the log file. # get to the log file.
report_outcome() { report_outcome() {
root="${1}" root="$(fullpath "${1}")"
format="${2}" format="${2}"
log_file="${3}" log_file="${3}"
start="${4}" start="${4}"
finish="${5}" finish="${5}"
escaped_root="$(fullpath "${root}" | sed 's/\//\\\//g')"
elapsed=$(($finish - $start)) elapsed=$(($finish - $start))
for number in n oks skips not_oks; do for number in n oks skips not_oks; do
eval "${number}=0" eval "${number}=0"
@ -464,8 +466,8 @@ report_outcome() {
cat "${log_file}" | LC_COLLATE=C sort > "${sorted_log_file}" cat "${log_file}" | LC_COLLATE=C sort > "${sorted_log_file}"
while read line; do while read line; do
abspath=$(echo "${line}" | cut -f1) path=$(echo "${line}" | cut -f1)
path=$(echo "${abspath}" | sed "s/$escaped_root\/\?//") abspath=${urchin_tmp}/${path}
the_shell=$(echo "${line}" | cut -f2) the_shell=$(echo "${line}" | cut -f2)
result=$(echo "${line}" | cut -f3) result=$(echo "${line}" | cut -f3)
file_elapsed=$(echo "$line" | cut -f4) file_elapsed=$(echo "$line" | cut -f4)