summaryrefslogtreecommitdiffstats
path: root/tests/tier.rc
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2016-02-25 20:36:11 +0530
committerRaghavendra Talur <rtalur@redhat.com>2016-02-25 17:43:52 -0800
commit5a9233ee37a10456a9f8f3c792cab37462f64098 (patch)
tree4e03815ef623e81faf95f919ae8a982cf556f1e9 /tests/tier.rc
parent025eebecefa45c8a3e6eb33fe382dd701ac9c28a (diff)
tests/glusterd: Parse the new time format
A recent change in cli changed elapsed time format that broke a test. This patch will fix the issue with parsing. Change-Id: I9a4a4b28f654cf2ac223e25abfc9df6570607d74 BUG: 1312036 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13524 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Diffstat (limited to 'tests/tier.rc')
-rw-r--r--tests/tier.rc10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/tier.rc b/tests/tier.rc
index 19234c521a0..dd220fe09d2 100644
--- a/tests/tier.rc
+++ b/tests/tier.rc
@@ -114,13 +114,17 @@ function sleep_until_mid_cycle {
sleep $mod
}
-function tier_deamon_check () {
+function tier_daemon_check () {
pgrep -f "rebalance/$V0"
echo "$?"
}
function rebalance_run_time () {
local time=$($CLI volume rebalance $1 status | awk '{print $9}' | sed -n 3p);
- time=$(printf "%.0f\n" "$time");
- echo $time
+ local hh=$(echo $time | cut -d ':' -f1);
+ local mm=$(echo $time | cut -d ':' -f2);
+ local ss=$(echo $time | cut -d ':' -f3);
+ local total=$(($hh * 3600 + $mm * 60 + $ss));
+
+ echo $total;
}