From: Aleksander Mistewicz Date: Mon, 1 Aug 2016 07:46:07 +0000 (+0200) Subject: Use WS instead of / in tsp/jobs/watch_diskspace.sh X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62660a86372290833bb5648106b530e6d9137a94;p=tools%2Ftestlab%2Fmajor.git Use WS instead of / in tsp/jobs/watch_diskspace.sh Manual configuration was required for this script to use proper value. Now it gets it automatically. Change-Id: Icd0881ba05bafe120387f159fbb29c5c604d8a27 Signed-off-by: Aleksander Mistewicz --- diff --git a/tsp/jobs/watch_diskspace.sh b/tsp/jobs/watch_diskspace.sh index b4acd1f..0ea233c 100755 --- a/tsp/jobs/watch_diskspace.sh +++ b/tsp/jobs/watch_diskspace.sh @@ -20,9 +20,8 @@ export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.." . "${TSP_DIR}/common.sh" -# Assume workspaces are stored on root partition. -# Get diskspace usage for root mountpoint. -PER="$(df -Ph | grep -o "[0-9][0-9]%.*/$")" +# Get diskspace usage for filesystem storing workspaces. +PER="$(df -P "${WS}" | grep -o "[0-9][0-9]%.*$")" # Leave only numerical value. PER="${PER%\%*}" if [ "$PER" -ge 70 ]