summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-04-19 08:59:53 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-06-06 11:44:33 (GMT)
commite9896da83265ec3a31db1da84ba97d3754f7c0c5 (patch)
tree3c96f6860e6f3818407fe28c536b184816299ff5
parent5e478407f5c974d0b4a30ff76ee347192778a53f (diff)
downloadmajor-e9896da83265ec3a31db1da84ba97d3754f7c0c5.zip
major-e9896da83265ec3a31db1da84ba97d3754f7c0c5.tar.gz
major-e9896da83265ec3a31db1da84ba97d3754f7c0c5.tar.bz2
Add rPi3 to TITSrefs/changes/24/130924/2
Database update is required. Delete it or run: . tsp/common.sh sqlite3 "${DBPATH}" -batch < tsp/results-values-device.sql Change-Id: I220f060a7186b047a2d55271beab1aafc4398863
-rwxr-xr-xtct/conf/conf.sh14
-rwxr-xr-xtct/flash/flash_dd_rpi3.sh48
-rwxr-xr-xtct/rpi3_prepare_flash_conf.sh63
-rwxr-xr-xtct/rpi3_run.sh65
-rwxr-xr-xtsp/common.sh9
-rw-r--r--tsp/image_map.example2
-rwxr-xr-xtsp/jobs/common_prep_flash_conf.sh4
-rw-r--r--tsp/results-values-device.sql1
-rwxr-xr-xtsp/scripts/common_prep_flash_conf.sh10
-rw-r--r--tsp/tree_unified2
10 files changed, 209 insertions, 9 deletions
diff --git a/tct/conf/conf.sh b/tct/conf/conf.sh
index 4998ff1..949d05c 100755
--- a/tct/conf/conf.sh
+++ b/tct/conf/conf.sh
@@ -77,12 +77,9 @@ copy_ssh() {
done
}
-wait_ssh() {
- SDMUX="$1"
- test -n "${SDMUX}" || die "Missing argument: sdmux"
+wait_ping() {
test -n "${IP}" || die "Missing env dependency: ip"
- CONNECT_CNT=0
SLEEP=${INIT_SLEEP}
sleep "${SLEEP}"
@@ -101,10 +98,17 @@ wait_ssh() {
fi
sleep "${SLEEP}"
SLEEP=$((SLEEP+INC_SLEEP))
- CONNECT_CNT=$((CONNECT_CNT+1))
done
printf "\n" >&2
+}
+
+wait_ssh() {
+ SDMUX="$1"
+ test -n "${SDMUX}" || die "Missing argument: sdmux"
+ test -n "${IP}" || die "Missing env dependency: ip"
+
+ wait_ping
SLEEP=10
diff --git a/tct/flash/flash_dd_rpi3.sh b/tct/flash/flash_dd_rpi3.sh
new file mode 100755
index 0000000..cc5d6a5
--- /dev/null
+++ b/tct/flash/flash_dd_rpi3.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Copyright (c) 2015 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 for flashing SD card using dd
+# the layout is:
+# * boot.img -> 1st partition
+# * rootfs.img -> 2nd partition
+# * systemd-data.img -> 3rd partition
+# * modules.img -> 6th partition
+#
+# script always checks for block device availability
+# files are taken from CWD
+# there are no checks if files exist, dd should fail
+#
+# SD card should be prepared using script mkpart.sh available at:
+# https://wiki.tizen.org/wiki/Quick_guide_for_odroid#Fuse_bootloader_image
+#
+# Author: Aleksander Mistewicz <a.mistewicz@samsung.com>
+
+TESTLAB_SCRIPTS="$(CDPATH='' cd -- "$(dirname -- "$0")"/.. && pwd -P)"
+
+. "${TESTLAB_SCRIPTS}/common.sh"
+
+test -n "${1}" || die "Too few arguments!"
+
+sdd="sudo dd bs=4096"
+test -b "${1}1" || die "No ${1}1"
+$sdd if=boot.img "of=${1}1"
+test -b "${1}2" || die "No ${1}2"
+$sdd if=rootfs.img "of=${1}2"
+test -b "${1}3" || die "No ${1}3"
+$sdd if=system-data.img "of=${1}3"
+test -b "${1}6" || die "No ${1}6"
+$sdd if=modules.img "of=${1}6"
+sync
diff --git a/tct/rpi3_prepare_flash_conf.sh b/tct/rpi3_prepare_flash_conf.sh
new file mode 100755
index 0000000..63083fc
--- /dev/null
+++ b/tct/rpi3_prepare_flash_conf.sh
@@ -0,0 +1,63 @@
+#!/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 flash, prepare and configure ODROID U3
+#
+# Syntax is: odroid_prepare_conf_flash.sh $SDMUX $BOOT_IMAGE $IMAGE \
+# [$NATIVE_TCT_REPO]
+#
+# Author: Aleksander Mistewicz <a.mistewicz@samsung.com>
+
+export TESTLAB_SCRIPTS="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
+
+. "${TESTLAB_SCRIPTS}/common.sh"
+
+SDMUX="$1"
+BOOT_IMAGE="$2"
+IMAGE="$3"
+
+test -n "${SDMUX}" || die "Missing argument: sdmux!"
+test -n "${BOOT_IMAGE}" || die "Missing argument: boot image!"
+test -n "${IMAGE}" || die "Missing argument: image!"
+
+. "${TESTLAB_SCRIPTS}/prepare/prepare.sh"
+. "${TESTLAB_SCRIPTS}/flash/flash.sh"
+
+echo "### prepare ###"
+
+IMAGE_UNPACKED="/tmp/image_unpacked_${SDMUX}"
+IMAGE_MOUNTPOINT="/tmp/image_mounted_${SDMUX}"
+
+switch2testserver "${SDMUX}"
+
+unpack_image "${BOOT_IMAGE}" "${IMAGE}" "${IMAGE_UNPACKED}"
+
+echo "### flash ###"
+
+UUID_FILE="/var/tmp/uuid-${SDMUX}"
+DEV_SDCARD=$(uuid2dev "${UUID_FILE}" "${SDMUX}") || die "sdcard not found!"
+
+cd "${IMAGE_UNPACKED}"
+"${TESTLAB_SCRIPTS}/flash/flash_dd_rpi3.sh" "${DEV_SDCARD}"
+RET=$?
+cd "${OLDPWD}"
+
+change_uuid "${UUID_FILE}" "${DEV_SDCARD}"
+if [ $RET -ne 0 ]; then
+ die "flash_dd exited with an error" "$RET"
+fi
+switch2device "${SDMUX}"
+restart_device "${SDMUX}"
diff --git a/tct/rpi3_run.sh b/tct/rpi3_run.sh
new file mode 100755
index 0000000..e095f2f
--- /dev/null
+++ b/tct/rpi3_run.sh
@@ -0,0 +1,65 @@
+#!/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!"
+
+IP="$(get_ip "${SDMUX}")" || die "Error: get_ip failed!"
+
+echo "### conf ###"
+
+CONNECT_CNT="$(wait_ping "${SDMUX}")" || die "wait_ping: failed!"
+
+sleep 4
+sdb connect "$IP"
+sleep 4
+sdb -s "${IP}" root on
+
+echo "### run ###"
+
+copy_sdb "${IP}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh"
+run_smoke_sdb "${IP}"
+
+cat sysctl.result
+
+if [ -f "common_test.yaml" ]
+then
+ run_avocado_sdb "${IP}" "avocado-results" "common_test.yaml"
+else
+ echo "Missing file: common_test.yaml; skipping avocado tests"
+fi
+
+echo "### cleanup ###"
+
+sdb disconnect "$IP"
+switch2testserver "${SDMUX}"
diff --git a/tsp/common.sh b/tsp/common.sh
index 75c9f9d..69f20fa 100755
--- a/tsp/common.sh
+++ b/tsp/common.sh
@@ -32,7 +32,8 @@ die() {
# * minnow32, minnow64
# * common-odroid, tv-odroid
# * mbr64
-TARGET_LIST="artik10 headless-artik5 mbr64 minnow64 minnow32 common-odroid tv-odroid ivi-odroid"
+# * rpi3
+TARGET_LIST="artik10 headless-artik5 mbr64 minnow64 minnow32 common-odroid tv-odroid ivi-odroid rpi3"
test -z "${TSP_DIR}" || export TS_ONFINISH="${TSP_DIR}/scripts/log.sh"
@@ -143,6 +144,9 @@ get_userspace_dir() {
*tv-odroid*)
USR_DIR="$(find "${DWN_WORKDIR}/" -type d -name "tv-wayland*-armv7l-odroidu3")"
;;
+ *rpi3*)
+ USR_DIR="$(find "${DWN_WORKDIR}/" -type d -name "*-headless-*-armv7l-rpi3")"
+ ;;
*headless-artik*)
USR_DIR="$(find "${DWN_WORKDIR}/" -type d -name "*-headless-*-armv7l-artik")"
;;
@@ -181,6 +185,9 @@ get_boot_dir() {
*tv-odroid*)
BOOT_DIR="$(find "${DWN_WORKDIR}/" -type d -name "tv-boot-armv7l-odroidu3")"
;;
+ *rpi3*)
+ BOOT_DIR="$(find "${DWN_WORKDIR}/" -type d -name "*-boot-arm64-rpi3")"
+ ;;
*artik5*)
BOOT_DIR="$(find "${DWN_WORKDIR}/" -type d -name "*-boot-armv7l-artik5")"
;;
diff --git a/tsp/image_map.example b/tsp/image_map.example
index 1fdd498..29e3159 100644
--- a/tsp/image_map.example
+++ b/tsp/image_map.example
@@ -10,3 +10,5 @@ emulator-wayland-mbr-i586
wayland-efi-i586
wayland-efi-x86_64
minimal-mbr-x86_64
+boot-arm64-rpi3
+headless-2parts-armv7l-rpi3
diff --git a/tsp/jobs/common_prep_flash_conf.sh b/tsp/jobs/common_prep_flash_conf.sh
index 210e9ce..8b5e7ce 100755
--- a/tsp/jobs/common_prep_flash_conf.sh
+++ b/tsp/jobs/common_prep_flash_conf.sh
@@ -41,7 +41,7 @@ update_db "${SR}" "Testing" "$BUILD_NR" "$TARGET"
USR_IMG_DIR="$(get_userspace_dir "${TARGET}" "${DWN_WORKDIR}")"
case "$TARGET" in
- *odroid*|*artik*)
+ *odroid*|*artik*|*rpi3*)
BOOT_IMG="$(ls "$(get_boot_dir "${TARGET}" "${DWN_WORKDIR}")"/*.tar.gz)"
test -f "${BOOT_IMG}" || BOOT_IMG="$(ls "$(get_boot_dir "${TARGET}" "${SNAPSHOT_WS_DOWNLOAD}-${PROFILE}")"/*.tar.gz)"
USERSPACE_IMG="$(ls "${USR_IMG_DIR}"/*.tar.gz)"
@@ -89,7 +89,7 @@ ssh tl-runner "rm -rf \"${WORKDIR_REMOTE}\"; mkdir -p \"${WORKDIR_REMOTE}\"" ||
# Copy required files
case "$TARGET" in
- *odroid*|*artik*)
+ *odroid*|*artik*|*rpi3*)
scp "${USERSPACE_IMG}" "${BOOT_IMG}" tl-runner:"${WORKDIR_REMOTE}/" || retrigger "ssh: copy failed"
;;
*minnow*)
diff --git a/tsp/results-values-device.sql b/tsp/results-values-device.sql
index 948e702..14dc0eb 100644
--- a/tsp/results-values-device.sql
+++ b/tsp/results-values-device.sql
@@ -8,3 +8,4 @@ INSERT OR IGNORE INTO device VALUES (NULL, "artik5");
INSERT OR IGNORE INTO device VALUES (NULL, "headless-artik5");
INSERT OR IGNORE INTO device VALUES (NULL, "artik10");
INSERT OR IGNORE INTO device VALUES (NULL, "headless-artik10");
+INSERT OR IGNORE INTO device VALUES (NULL, "rpi3");
diff --git a/tsp/scripts/common_prep_flash_conf.sh b/tsp/scripts/common_prep_flash_conf.sh
index 195e6bf..85842ad 100755
--- a/tsp/scripts/common_prep_flash_conf.sh
+++ b/tsp/scripts/common_prep_flash_conf.sh
@@ -31,6 +31,10 @@ case "$TARGET" in
USR_IMG="$(pwd)/$(ls tizen-*-wayland-*odroid*.tar.gz)"
test -f "$USR_IMG" || USR_IMG="$(pwd)/$(ls tizen-*-target-*odroid*.tar.gz)"
;;
+ *rpi3*)
+ BOOT_IMG="$(pwd)/$(ls tizen-*-boot-*rpi3*.tar.gz)"
+ USR_IMG="$(pwd)/$(ls tizen-*-headless-*rpi3*.tar.gz)"
+ ;;
*artik*)
BOOT_IMG="$(pwd)/$(ls tizen-*-boot-*artik*.tar.gz)"
USR_IMG="$(pwd)/$(ls tizen-*-3parts-*artik*.tar.gz)"
@@ -69,7 +73,7 @@ echo "sdmux allocated: ${SDMUX}"
clean() {
case "$TARGET" in
- *odroid*|*artik*)
+ *odroid*|*artik*|*rpi3*)
rm -v "$USR_IMG" "$BOOT_IMG"
;;
*minnow*)
@@ -95,6 +99,10 @@ case "$TARGET" in
"${TESTLAB_MAJOR}/tct/odroid_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG" || failed "Flash failed"
"${TESTLAB_MAJOR}/tct/odroid_run.sh" "$SDMUX"
;;
+ *rpi3*)
+ "${TESTLAB_MAJOR}/tct/rpi3_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG" || failed "Flash failed"
+ "${TESTLAB_MAJOR}/tct/rpi3_run.sh" "$SDMUX"
+ ;;
*artik*)
"${TESTLAB_MAJOR}/tct/artik_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG" || failed "Flash failed"
"${TESTLAB_MAJOR}/tct/odroid_run.sh" "$SDMUX"
diff --git a/tsp/tree_unified b/tsp/tree_unified
index 5ff8a8f..e49ff86 100644
--- a/tsp/tree_unified
+++ b/tsp/tree_unified
@@ -19,3 +19,5 @@ images/standard/tv-boot-armv7l-odroidu3/MD5SUMS
images/standard/common-installer-mbr-i586/MD5SUMS
images/standard/common-wayland-efi-x86_64/MD5SUMS
images/standard/ivi-target-odroidxu3/MD5SUMS
+images/standard/common-boot-arm64-rpi3/MD5SUMS
+images/standard/common-headless-2parts-armv7l-rpi3/MD5SUMS