Add run_avocado_sdb() to tct/run/run.sh 36/84436/9
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Thu, 18 Aug 2016 12:32:48 +0000 (14:32 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 6 Dec 2016 15:37:14 +0000 (16:37 +0100)
Change-Id: I656c7302ed5fbf79b277890920b9d93b897eeb9d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tct/run/run.sh

index 383c5cf..1d744e7 100755 (executable)
@@ -115,3 +115,18 @@ run_avocado_ssh() {
         --multiplex "${MULTIPLEX_FILE}" \
         --job-results-dir "${RESULTS}"
 }
+
+run_avocado_sdb() {
+    SERIAL="$1"
+    RESULTS="$2"
+    MULTIPLEX_FILE="$3"
+    test -n "${SERIAL}" || die "Missing argument: serial"
+    test -n "${RESULTS}" || die "Missing argument: results"
+    test -n "${MULTIPLEX_FILE}" || die "Missing argument: multiplex_file"
+
+    sed -i "s:SERIAL_VALUE:${SERIAL}:" "${MULTIPLEX_FILE}"
+
+    avocado run "${TESTLAB_SCRIPTS}/run/common_test.py" \
+        --multiplex "${MULTIPLEX_FILE}" \
+        --job-results-dir "${RESULTS}"
+}