]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
build-ceph.sh: kill lingering ceph-mon,ceph-osd 79/head
authorKefu Chai <tchaikov@gmail.com>
Thu, 21 Jul 2016 09:06:43 +0000 (17:06 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 21 Jul 2016 09:11:03 +0000 (17:11 +0800)
this puts the changes of f23343e and e0af3d3 back. they still apply to the
cmake run.

this change partially reverts 934a7a3.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
build-ceph.sh

index 1b2e689c5f3f23599807a27efb51162e0f9c6e95..a9d91decc6aababc811b956b0fa2537531a99735 100755 (executable)
@@ -1,6 +1,12 @@
 #!/bin/bash -x
 set -e -o pipefail
 
+SECONDS=0
+
+function print_runtime() {
+    printf "Total run time: %d:%02d\n" $((SECONDS / 60 )) $((SECONDS % 60))
+}
+
 bindir=`dirname $0`
 . $bindir/reset-modules.sh
 
@@ -14,6 +20,8 @@ OUTDIR_TMP="${OUTDIR}.tmp"
 install -d -m0755 -- "$OUTDIR_TMP"
 printf '%s\n' "$REV" >"$OUTDIR_TMP/sha1"
 
+trap "pkill -9 'ceph-(osd|mon)' || true; print_runtime" EXIT
+
 ./run-make-check.sh | tee $OUTDIR_TMP/run-make-check.log
 
 # we're successful, the files are ok to be published; try to be as