summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtct/odroid_prepare_flash_conf.sh19
-rwxr-xr-xtct/odroid_run.sh56
-rwxr-xr-xtsp/scripts/common_prep_flash_conf.sh1
3 files changed, 59 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}"
diff --git a/tsp/scripts/common_prep_flash_conf.sh b/tsp/scripts/common_prep_flash_conf.sh
index 30ae6d6..b114319 100755
--- a/tsp/scripts/common_prep_flash_conf.sh
+++ b/tsp/scripts/common_prep_flash_conf.sh
@@ -54,6 +54,7 @@ fi
case "$TARGET" in
*odroid*)
"${TESTLAB_MAJOR}/tct/odroid_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG"
+ "${TESTLAB_MAJOR}/tct/odroid_run.sh" "$SDMUX"
;;
*minnow*)
"${TESTLAB_MAJOR}/tct/minnow_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG"