From b0ba1ff0c60e80296ba4a9b6e1912689420eb3e4 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Tue, 10 Dec 2019 15:43:43 -0800 Subject: [PATCH] use tail instead of bc for div --- hack/jenkins/common.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index ceb9c32dc9..60002060c2 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -280,9 +280,12 @@ else echo "minikube: FAIL" fi +## caclucate the time took to finish running e2e binary test. e2e_end_time="$(date -u +%s)" elapsed=$(($e2e_end_time-$e2e_start_time)) -elapsed=$(bc <<< "scale=2;$elapsed/60") +min=$(($elapsed/60)) +sec=$(tail -c 3 <<< $((${elapsed}00/60))) +elapsed=$min.$sec description="completed with ${status} in ${elapsed} minute(s)." echo $description