1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

shtests: print CPU times used at end (re: ebf71e61)

Since we now have a shiny new POSIX compliant 'times' builtin,
we might as well use it.

src/cmd/ksh93/tests/shtests:
- Run 'times' at end of test run.
- Skip the pretty-printing until #7 is fixed.

(cherry picked from commit 2c27d9fbc239583004ec70377db98627eea5e294)
This commit is contained in:
Martijn Dekker 2020-06-10 11:25:22 +02:00
parent e92faddbf9
commit d1bd8f89b7

View file

@ -386,4 +386,18 @@ do [[ $i == *.sh ]] || i+='.sh'
fi fi
done done
print "Total errors: $total_e" print "Total errors: $total_e"
# TODO: output process substitution is fatally broken.
# Until that is fixed, skip the pretty-printing.
# See https://github.com/modernish/ksh/issues/7
#print $'CPU time used:\n\\t user:\t system:'
#times > >(
# t[0]='main'
# read t[1] t[2]
# t[3]='*.sh'
# read t[4] t[5]
# printf '%s:\t%s\t%s\n' "${t[@]}"
#)
times
exit $((total_e > 125 ? 125 : total_e)) exit $((total_e > 125 ? 125 : total_e))