Remove tl-runner, tl-master split 10/181810/1
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 13 Jun 2017 13:45:38 +0000 (15:45 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 8 Aug 2017 08:18:08 +0000 (10:18 +0200)
Use `cp -l` instead of `scp`.

Change-Id: Ied93bb00cd96c1436e2455012a23ce9105bbbc78

tsp/jobs/common_prep_flash_conf.sh

index 8b5e7ce..01e5c44 100755 (executable)
@@ -76,7 +76,7 @@ retrigger() {
         tspwb -L PUBLISH sh "${TSP_DIR}/jobs/publish.sh" "$BUILD_NR" "$TARGET"
         exit 1
     fi
-    ssh tl-runner "rm -rf \"${WORKDIR_REMOTE}\"; mkdir -p \"${WORKDIR_REMOTE}\"" || retrigger "ssh: remote ws cleanup failed"
+    rm -rf "${WORKDIR_REMOTE}" && mkdir -p "${WORKDIR_REMOTE}" || retrigger "remote ws cleanup failed"
     tsrun_target "${TARGET#*-}" -L "RETRIGGERED_$(echo "$TARGET" | tr '[:lower:]' '[:upper:]')_PREPARE_FLASH_CONF" \
         sh "${TSP_DIR}/jobs/common_prep_flash_conf.sh" "$BUILD_NR" "${TARGET}" "$((FAIL_CNT + 1))"
     # Update status in database
@@ -84,19 +84,19 @@ retrigger() {
     exit 0
 }
 
-# Create and clean required directories on remote machine (tl-runner)
-ssh tl-runner "rm -rf \"${WORKDIR_REMOTE}\"; mkdir -p \"${WORKDIR_REMOTE}\"" || retrigger "ssh: remote ws cleanup failed"
+# Create and clean required directories
+rm -rf "${WORKDIR_REMOTE}" && mkdir -p "${WORKDIR_REMOTE}" || retrigger "remote ws cleanup failed"
 
 # Copy required files
 case "$TARGET" in
     *odroid*|*artik*|*rpi3*)
-        scp "${USERSPACE_IMG}" "${BOOT_IMG}" tl-runner:"${WORKDIR_REMOTE}/" || retrigger "ssh: copy failed"
+        cp -s "${USERSPACE_IMG}" "${BOOT_IMG}" "${WORKDIR_REMOTE}/" || retrigger "copy failed"
         ;;
     *minnow*)
-        scp "${USERSPACE_IMG}" "${USERSPACE_IMG_BMAP}" tl-runner:"${WORKDIR_REMOTE}/" || retrigger "ssh: copy failed"
+        cp -s "${USERSPACE_IMG}" "${USERSPACE_IMG_BMAP}" "${WORKDIR_REMOTE}/" || retrigger "copy failed"
         ;;
     *mbr64*)
-        scp "${USERSPACE_IMG}" "${KERNEL}" tl-runner:"${WORKDIR_REMOTE}/" || retrigger "ssh: copy failed"
+        cp -s "${USERSPACE_IMG}" "${KERNEL}" "${WORKDIR_REMOTE}/" || retrigger "copy failed"
         ;;
 esac
 
@@ -106,17 +106,16 @@ test -f "${ORG_MULTIPLEX_FILE}" || ORG_MULTIPLEX_FILE="${TSP_DIR}/common_test.ya
 cp "${ORG_MULTIPLEX_FILE}" "${MULTIPLEX_FILE}"
 
 # Copy multiplex file used by avocado
-scp "${MULTIPLEX_FILE}" tl-runner:"${WORKDIR_REMOTE}/" || retrigger "ssh: copy failed"
+cp "${MULTIPLEX_FILE}" "${WORKDIR_REMOTE}/" || retrigger "copy failed"
 
 echo "start remote script"
-ssh tl-runner "TARGET=${TARGET} WORKDIR_REMOTE=${WORKDIR_REMOTE} timeout 10m sh -s --" \
-    < "${TSP_DIR}/scripts/common_prep_flash_conf.sh" || retrigger "ssh: remote script execution failed"
+WORKDIR_REMOTE="${WORKDIR_REMOTE}" TARGET="${TARGET}" timeout 10m sh "${TSP_DIR}/scripts/common_prep_flash_conf.sh" \
+    || retrigger "script execution failed"
 echo "finish remote script"
 
 # Copy the results
-scp tl-runner:"${WORKDIR_REMOTE}/sysctl.result" .
-scp tl-runner:"${WORKDIR_REMOTE}/screenshot.png" .
-scp -r tl-runner:"${WORKDIR_REMOTE}/avocado-results" .
+cp "${WORKDIR_REMOTE}/sysctl.result" "${WORKDIR_REMOTE}/screenshot.png" .
+cp -r "${WORKDIR_REMOTE}/avocado-results" .
 
 {
     echo "RETRIGGER_CNT ${FAIL_CNT}"