diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-05-16 11:20:32 +0200 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-06-01 18:33:13 +0200 |
commit | ea8fe8680d1995bf14453d7c74d070cc14620cbc (patch) | |
tree | 7d27d505d093bcd1ec569094568259940666beb1 /tct/conf | |
parent | 16f3f791cc4fa02fa7e57ee0e564a70b5e6bced8 (diff) | |
download | major-ea8fe8680d1995bf14453d7c74d070cc14620cbc.tar.gz major-ea8fe8680d1995bf14453d7c74d070cc14620cbc.tar.bz2 major-ea8fe8680d1995bf14453d7c74d070cc14620cbc.zip |
Move smoke tests to separate file
Change-Id: I5d6e7d58ffa444cb8b0d5202afeb1e4b72fe1c69
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tct/conf')
-rwxr-xr-x | tct/conf/conf.sh | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/tct/conf/conf.sh b/tct/conf/conf.sh index 0a3d8ac..0435a34 100755 --- a/tct/conf/conf.sh +++ b/tct/conf/conf.sh @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Syntax is: conf_device $ID $NATIVE_TCT_REPO +# Syntax is: +# conf_device $ID $NATIVE_TCT_REPO +# copy_ssh $IP $FILE +# copy_sdb $ID $FILE +# # conf_device runs install script from Native TCT repository and copies files # required by TCT in order to properly test the image on a target device. # @@ -50,3 +54,29 @@ conf_device() { sdb -s "${ID}" push "${TESTLAB_SCRIPTS}/conf/configure_env.sh" /etc/profile.d/ } + +copy_ssh() { + IP="$1" + FILE="$2" + test -n "${IP}" || die "Missing argument: ip" + test -n "${FILE}" || die "Missing argument: file" + COUNT=1 + while ! sudo sshpass -p 'tizen' scp -F ${TESTLAB_SCRIPTS}/conf/ssh_config \ + "${FILE}" "root@${IP}:/tmp/smoke.sh" + do + echo "SSH connection to ${IP} failed: retrying" >&2 + if [ ${COUNT} -ge 6 ] + then + die "Timeout: ssh connection failed!" + fi + COUNT=$((COUNT+1)) + done +} + +copy_sdb() { + ID="$1" + FILE="$2" + test -n "${ID}" || die "Missing argument: id" + test -n "${FILE}" || die "Missing argument: file" + sdb -s "${ID}" push "${FILE}" "/tmp/smoke.sh" || die "SDB copy failed!" +} |