automated: linux: ltp: increase timeout for slow machines

The default timeout is 5min per test case.
Increase timeout for slow machines with the help of variable
${MINUTES_TO_TIMEOUT} from yaml file.

Change-Id: Ibd4c022d15f203cc8eedca76ff754ab030f73391
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh
index 47b087e..2b5201a 100755
--- a/automated/linux/ltp/ltp.sh
+++ b/automated/linux/ltp/ltp.sh
@@ -18,11 +18,11 @@
 LTP_PATH=/opt/ltp
 
 usage() {
-    echo "Usage: ${0} [-T mm,math,syscalls] [-S skipfile-lsk-juno] [-s <flase>] [-v LTP_VERSION]" 1>&2
+    echo "Usage: ${0} [-T mm,math,syscalls] [-S skipfile-lsk-juno] [-s <flase>] [-v LTP_VERSION] [-M Minutes_To_Timeout]" 1>&2
     exit 0
 }
 
-while getopts "T:S:s:v:" arg; do
+while getopts "M:T:S:s:v:" arg; do
    case "$arg" in
      T)
         TST_CMDFILES="${OPTARG}"
@@ -45,6 +45,8 @@
      # SKIP_INSTALL is flase in case of Debian builds
      s) SKIP_INSTALL="${OPTARG}";;
      v) LTP_VERSION="${OPTARG}";;
+     # Slow machines need more timeout Default is 5min and multiply * MINUTES
+     M) export LTP_TIMEOUT_MUL="${OPTARG}";;
   esac
 done
 
diff --git a/automated/linux/ltp/ltp.yaml b/automated/linux/ltp/ltp.yaml
index 28919df..4a15c6b 100644
--- a/automated/linux/ltp/ltp.yaml
+++ b/automated/linux/ltp/ltp.yaml
@@ -29,11 +29,13 @@
     # NOTE: busybox wget may not work with https link so pefer to use http
     SKIPFILE: ""
     SKIP_INSTALL: false
+    # Slow machines need more timeout Default is 5min and multiply * MINUTES
+    MINUTES_TO_TIMEOUT:
 
 run:
     steps:
         - cd ./automated/linux/ltp/
-        - ./ltp.sh -T "${TST_CMDFILES}" -S "${SKIPFILE}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}"
+        - ./ltp.sh -T "${TST_CMDFILES}" -S "${SKIPFILE}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${MINUTES_TO_TIMEOUT}"
         - ../../utils/send-to-lava.sh ./output/result.txt
 
 parse: