# Syntax is:
# conf_device $ID $NATIVE_TCT_REPO
-# copy_ssh $IP $FILE
-# copy_sdb $ID $FILE
+# copy_ssh $IP $FILE [$DEST]
+# copy_sdb $ID $FILE [$DEST]
#
# 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.
#
# Author: Aleksander Mistewicz <a.mistewicz@samsung.com>
+DEFAULT_DEST="/tmp/smoke.sh"
+
conf_device() {
ID="$1"
NATIVE_TCT_REPO="$2"
copy_ssh() {
IP="$1"
FILE="$2"
+ DEST="$3"
test -n "${IP}" || die "Missing argument: ip"
test -n "${FILE}" || die "Missing argument: file"
+ test -n "${DEST}" || DEST="${DEFAULT_DEST}"
COUNT=1
while ! timeout 60 sshpass -p 'tizen' scp -F "${TESTLAB_SCRIPTS}/conf/ssh_config" \
- "${FILE}" "root@${IP}:/tmp/smoke.sh"
+ "${FILE}" "root@${IP}:${DEST}"
do
echo "SSH connection to ${IP} failed: retrying" >&2
if [ ${COUNT} -ge 6 ]
copy_sdb() {
ID="$1"
FILE="$2"
+ DEST="$3"
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!"
+ test -n "${DEST}" || DEST="${DEFAULT_DEST}"
+ sdb -s "${ID}" push "${FILE}" "${DEST}" || die "SDB copy failed!"
}