From 6bacaecb263a303469d64bb06739fa307cef4882 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Fri, 16 Feb 2018 17:51:32 +0100 Subject: [PATCH] Make all targets use SDB over IP Change-Id: I2e0f0f6c675638624d6543fe364b738204e10459 --- tct/odroid_run.sh | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/tct/odroid_run.sh b/tct/odroid_run.sh index f988251..2c01488 100755 --- a/tct/odroid_run.sh +++ b/tct/odroid_run.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +# Copyright (c) 2016, 2018 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. @@ -34,19 +34,21 @@ 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_sdb "${SDMUX}")" || die "wait_sdb: failed!" +CONNECT_CNT="$(wait_ping)" || die "wait_ping: failed!" -printf "\n" sleep 4 - -sdb -s "${SDMUX}" root on +sdb connect "$IP" +sleep 4 +sdb -s "${IP}" root on echo "### run ###" -copy_sdb "${SDMUX}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh" -run_smoke_sdb "${SDMUX}" +copy_sdb "${IP}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh" +run_smoke_sdb "${IP}" # FIXME case "$SDMUX" in @@ -59,28 +61,29 @@ case "$SDMUX" in esac # Run go-smoke tests -go-smoke -sdb "${SDMUX}" -conf test.conf -out smoke.json +go-smoke -sdb "${IP}" -conf test.conf -out smoke.json test -f "screenshot.png" && mv -v "screenshot.png" "smoke.png" if [ -f "${SCREENSHOOTER_RPM}" ] && [ -z "$IGNORE" ] then - sdb -s "${SDMUX}" shell mount -o rw,remount / - copy_sdb "${SDMUX}" "${SCREENSHOOTER_RPM}" "/tmp" - sdb -s "${SDMUX}" shell rpm -i "/tmp/${SCREENSHOOTER_RPM##*/}" - sdb -s "${SDMUX}" shell sync + sdb -s "${IP}" shell mount -o rw,remount / + copy_sdb "${IP}" "${SCREENSHOOTER_RPM}" "/tmp" + sdb -s "${IP}" shell rpm -i "/tmp/${SCREENSHOOTER_RPM##*/}" + sdb -s "${IP}" shell sync TMP_SCREENSHOT="/tmp/screenshot.png" - sdb -s "${SDMUX}" shell "XDG_RUNTIME_DIR=/run" screenshooter -f "${TMP_SCREENSHOT}" - sdb -s "${SDMUX}" pull "${TMP_SCREENSHOT}" . - sdb -s "${SDMUX}" shell mount -o ro,remount / + sdb -s "${IP}" shell "XDG_RUNTIME_DIR=/run" screenshooter -f "${TMP_SCREENSHOT}" + sdb -s "${IP}" pull "${TMP_SCREENSHOT}" . + sdb -s "${IP}" shell mount -o ro,remount / fi if [ -f "common_test.yaml" ] then - run_avocado_sdb "${SDMUX}" "avocado-results" "common_test.yaml" + 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}" -- 2.7.4