Skip to content

Commit

Permalink
shtests: print CPU times used at end (re: ebf71e61)
Browse files Browse the repository at this point in the history
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 ksh93#7 is fixed.

(cherry picked from commit 2c27d9fbc239583004ec70377db98627eea5e294)
  • Loading branch information
McDutchie committed Jun 11, 2020
1 parent e92fadd commit d1bd8f8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/cmd/ksh93/tests/shtests
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,18 @@ do [[ $i == *.sh ]] || i+='.sh'
fi
done
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))

0 comments on commit d1bd8f8

Please sign in to comment.