Signed-off-by: Dan Mick <dan.mick@redhat.com>
#!/bin/bash -x
set -e
+SECONDS=0
+
+function print_runtime() {
+ printf "Total run time: %d:%02d\n" $((SECONDS / 60 )) $((SECONDS % 60))
+}
+
git submodule foreach 'git clean -fdx && git reset --hard'
rm -rf ceph-object-corpus
rm -rf ceph-erasure-code-corpus
# run "make check", but give it a time limit in case a test gets stuck
-trap "pkill -9 ceph-osd || true ; pkill -9 ceph-mon || true" EXIT
+trap "pkill -9 ceph-osd || true ; pkill -9 ceph-mon || true; print_runtime" EXIT
if ! ../maxtime 5400 make $(maybe_parallel_make_check) check "$@" ; then
display_failures .