summaryrefslogtreecommitdiff
path: root/tct
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-09-09 10:57:57 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2016-12-06 16:37:14 +0100
commita1c04168214352c9f6bc0476c22ffa80f026894b (patch)
tree89f5b185fb75f3c34d53b14c49f43ed600850ee5 /tct
parentf1e2c6f8942e481488a4a383f6404f1f304d2a2e (diff)
downloadmajor-a1c04168214352c9f6bc0476c22ffa80f026894b.tar.gz
major-a1c04168214352c9f6bc0476c22ffa80f026894b.tar.bz2
major-a1c04168214352c9f6bc0476c22ffa80f026894b.zip
Move "run" section to separate file for odroid
Change-Id: Ia905a23c3975cde0cfadea484db39b1816c711e0 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tct')
-rwxr-xr-xtct/odroid_prepare_flash_conf.sh19
-rwxr-xr-xtct/odroid_run.sh56
2 files changed, 58 insertions, 17 deletions
diff --git a/tct/odroid_prepare_flash_conf.sh b/tct/odroid_prepare_flash_conf.sh
index ed74a29..11b17bb 100755
--- a/tct/odroid_prepare_flash_conf.sh
+++ b/tct/odroid_prepare_flash_conf.sh
@@ -15,6 +15,7 @@
# limitations under the License.
# Script used to flash, prepare and configure ODROID U3
+# It leaves CONNECT_CNT in sysctl.result to be later used by odroid_run.sh
#
# Syntax is: odroid_prepare_conf_flash.sh $SDMUX $BOOT_IMAGE $IMAGE \
# [$NATIVE_TCT_REPO]
@@ -37,7 +38,6 @@ test -n "${IMAGE}" || die "Missing argument: image!"
. "${TESTLAB_SCRIPTS}/prepare/prepare.sh"
. "${TESTLAB_SCRIPTS}/flash/flash.sh"
. "${TESTLAB_SCRIPTS}/conf/conf.sh"
-. "${TESTLAB_SCRIPTS}/run/run.sh"
echo "### prepare ###"
@@ -104,24 +104,9 @@ else
sdb -s "${SDMUX}" root on
fi
-copy_sdb "${SDMUX}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh"
-run_smoke_sdb "${SDMUX}"
-
-echo "CONNECT_CNT $CONNECT_CNT" >> sysctl.result
-cat sysctl.result
-
-echo "### run ###"
-
-if [ -f "common_test.yaml" ]
-then
- run_avocado_sdb "${SDMUX}" "avocado-results" "common_test.yaml"
-else
- echo "Missing file: common_test.yaml; skipping avocado tests"
-fi
+echo "CONNECT_CNT $CONNECT_CNT" > sysctl.result
echo "### cleanup ###"
-switch2testserver "${SDMUX}"
-
rm -rf "${IMAGE_MOUNTPOINT}"
rm -rf "${IMAGE_UNPACKED}"
diff --git a/tct/odroid_run.sh b/tct/odroid_run.sh
new file mode 100755
index 0000000..6a9ccde
--- /dev/null
+++ b/tct/odroid_run.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Script used to run smoke and avocado tests on ODROID U3
+# It preserves CONNECT_CNT information left by odroid_prepare_flash_conf.sh
+# After test SDMUX is switched to testserver in order to increase sdcard
+# longetivity and make next flash faster.
+#
+# Syntax is: odroid_run.sh $SDMUX [$NATIVE_TCT_REPO]
+#
+# Author: Aleksander Mistewicz <a.mistewicz@samsung.com>
+export TESTLAB_SCRIPTS="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
+
+. "${TESTLAB_SCRIPTS}/common.sh"
+. "${TESTLAB_SCRIPTS}/conf/conf.sh"
+. "${TESTLAB_SCRIPTS}/run/run.sh"
+. "${TESTLAB_SCRIPTS}/flash/flash.sh"
+
+SDMUX="$1"
+NATIVE_TCT_REPO="$2"
+
+test -n "${SDMUX}" || die "Missing argument: sdmux!"
+
+echo "### run ###"
+
+test -f sysctl.result && CONNECT_CNT_STR="$(cat sysctl.result)"
+
+copy_sdb "${SDMUX}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh"
+run_smoke_sdb "${SDMUX}"
+
+test -n "$CONNECT_CNT_STR" && echo "$CONNECT_CNT_STR" >> sysctl.result
+cat sysctl.result
+
+if [ -f "common_test.yaml" ]
+then
+ run_avocado_sdb "${SDMUX}" "avocado-results" "common_test.yaml"
+else
+ echo "Missing file: common_test.yaml; skipping avocado tests"
+fi
+
+echo "### cleanup ###"
+
+switch2testserver "${SDMUX}"