From c4350577e1315045c5e620ca12e4680268863267 Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Fri, 26 Apr 2019 07:28:08 +0200
Subject: [PATCH] lkft: add x15 to the ssuite run

Change-Id: I4045502384315b5f42b9acc8b1b2645bd88370f0
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 openembedded-lkft/lava-job-definitions/devices/x15       | 16 ++++++++++++++++
 openembedded-lkft/lava-job-definitions/devices/x86       |  1 +
 .../lava-job-definitions/testplan/ssuite.yaml            |  2 +-
 openembedded-lkft/submit_for_testing.sh                  |  2 +-
 4 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/openembedded-lkft/lava-job-definitions/devices/x15 b/openembedded-lkft/lava-job-definitions/devices/x15
index 4be8fca5ff4c..01cf5e2451c9 100644
--- a/openembedded-lkft/lava-job-definitions/devices/x15
+++ b/openembedded-lkft/lava-job-definitions/devices/x15
@@ -37,3 +37,19 @@
       minutes: 15
     method: u-boot
 {% endblock boot_target %}
+
+{% block test_target %}
+  {{ super() }}
+    - from: inline
+      repository:
+        metadata:
+          format: Lava-Test Test Definition 1.0
+          name: prep-tmp-disk
+          description: "Mount local disk for tmp space"
+        run:
+          steps:
+          - echo "/dev/$(lsblk -il| grep " /$"| awk '{ print $1 }')|tee /my-device-or-partition
+      name: prep-tmp-disk
+      path: inline/prep.yaml
+{% endblock test_target %}
+
diff --git a/openembedded-lkft/lava-job-definitions/devices/x86 b/openembedded-lkft/lava-job-definitions/devices/x86
index 506978455060..4d5fbe0ebbb2 100644
--- a/openembedded-lkft/lava-job-definitions/devices/x86
+++ b/openembedded-lkft/lava-job-definitions/devices/x86
@@ -58,6 +58,7 @@ context:
           - mount ${STORAGE_DEV} /scratch && echo "mounted" || lava-test-raise "mount ${STORAGE_DEV} failed; job exit"
           - df -h
           - mount
+          - echo $(lava-target-storage SATA || lava-target-storage USB)|tee /my-device-or-partition
       name: prep-tmp-disk
       path: inline/prep.yaml
 {% endblock test_target %}
diff --git a/openembedded-lkft/lava-job-definitions/testplan/ssuite.yaml b/openembedded-lkft/lava-job-definitions/testplan/ssuite.yaml
index c3d49c64b702..4f799df850c7 100644
--- a/openembedded-lkft/lava-job-definitions/testplan/ssuite.yaml
+++ b/openembedded-lkft/lava-job-definitions/testplan/ssuite.yaml
@@ -1,6 +1,6 @@
 {% extends "master/template-ssuite.yaml.jinja2" %}
 
 {% set testnames = 'throughput replayed-startup' %}
-{% set testdevnames = '$(lava-target-storage SATA || lava-target-storage USB)' %}
+{% set testdevnames = 'echo /my-device-or-partition' %}
 {% set s_path = '/opt/S-suite/' %}
 {% set job_timeout = 60 %}
diff --git a/openembedded-lkft/submit_for_testing.sh b/openembedded-lkft/submit_for_testing.sh
index 411e9f9b7c82..696dccc9ce36 100755
--- a/openembedded-lkft/submit_for_testing.sh
+++ b/openembedded-lkft/submit_for_testing.sh
@@ -119,7 +119,7 @@ for test in ${TEST_FILES}; do
             FULL_TEST_TEMPLATES="${FULL_TEST_TEMPLATES} testplan/${test}"
         fi
     elif [[ ${test} = "ssuite.yaml" ]];then
-        if [[ ${DEVICE_TYPE} = "x86" ]];then
+        if [[ ${DEVICE_TYPE} = "x86" || ${DEVICE_TYPE} = "x15" ]];then
             FULL_TEST_TEMPLATES="${FULL_TEST_TEMPLATES} testplan/${test}"
         fi
     else
-- 
2.11.0

