ltp: add a variable for LTP_TMPDIR

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh
index 9a28aa3..033728b 100755
--- a/automated/linux/ltp/ltp.sh
+++ b/automated/linux/ltp/ltp.sh
@@ -30,6 +30,7 @@
     echo "Usage: ${0} [-T mm,math,syscalls]
                       [-S skipfile-lsk-juno]
                       [-b board]
+                      [-d temp directory]
                       [-g branch]
                       [-e environment]
                       [-s True|False]
@@ -39,7 +40,7 @@
     exit 0
 }
 
-while getopts "M:T:S:b:g:e:s:v:R:" arg; do
+while getopts "M:T:S:b:d:g:e:s:v:R:" arg; do
    case "$arg" in
      T)
         TST_CMDFILES="${OPTARG}"
@@ -73,6 +74,9 @@
      b)
         export BOARD="${OPTARG}"
         ;;
+     d)
+        export LTP_TMPDIR="${OPTARG}"
+        ;;
      g)
         export BRANCH="${OPTARG}"
         ;;
diff --git a/automated/linux/ltp/ltp.yaml b/automated/linux/ltp/ltp.yaml
index 76dc432..e2aa40e 100644
--- a/automated/linux/ltp/ltp.yaml
+++ b/automated/linux/ltp/ltp.yaml
@@ -36,6 +36,7 @@
     # generating a skipfile using a yaml skipfile and skipgen.
     BOARD: ""
     BRANCH: ""
+    LTP_TMPDIR: "/ltp-tmp"
     ENVIRONMENT: ""
 
     SKIP_INSTALL: false
@@ -47,5 +48,5 @@
 run:
     steps:
         - cd ./automated/linux/ltp/
-        - ./ltp.sh -T "${TST_CMDFILES}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}" -b "${BOARD}" -g "${BRANCH}" -e "${ENVIRONMENT}" -S "${SKIPFILE}"
+        - ./ltp.sh -T "${TST_CMDFILES}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}" -b "${BOARD}" -d "${LTP_TMPDIR}" -g "${BRANCH}" -e "${ENVIRONMENT}" -S "${SKIPFILE}"
         - ../../utils/send-to-lava.sh ./output/result.txt