Skip to content

Commit 14af6cc

Browse files
authored
[rsync] Allow passing additional flags to the remote execution client
`TEST_SUITE_REMOTE_CLIENT` can be used to pass additional flags to the remote execution client, such as specifying an alternative SSH configuration file. For example: `TEST_SUITE_REMOTE_CLIENT="ssh -F path/to/config/file"`.
1 parent 6a38b29 commit 14af6cc

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ mark_as_advanced(TEST_SUITE_REMOTE_CLIENT)
107107
if(TEST_SUITE_REMOTE_HOST)
108108
add_custom_target(rsync
109109
COMMAND ${PROJECT_SOURCE_DIR}/utils/rsync.sh
110-
${TEST_SUITE_REMOTE_HOST} ${PROJECT_BINARY_DIR}
110+
${TEST_SUITE_REMOTE_CLIENT}
111+
${TEST_SUITE_REMOTE_HOST}
112+
${PROJECT_BINARY_DIR}
111113
USES_TERMINAL
112114
)
113115
endif()

utils/rsync.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22
# Sync a build directory to remote device for running.
33
set -eu
4-
DEVICE="$1"
5-
BUILDDIR="$2"
4+
CLIENT="$1"
5+
DEVICE="$2"
6+
BUILDDIR="$3"
67

78
case $BUILDDIR in
89
/*) ;;
@@ -15,6 +16,7 @@ esac
1516
RSYNC_FLAGS=""
1617
RSYNC_FLAGS+=" -a"
1718
RSYNC_FLAGS+=" --delete --delete-excluded"
19+
RSYNC_FLAGS+=" -e \"$CLIENT\""
1820
# We cannot easily differentiate between intermediate build results and
1921
# files necessary to run the benchmark, so for now we just exclude based on
2022
# some file extensions...
@@ -30,5 +32,5 @@ RSYNC_FLAGS+=" --exclude=rules.ninja"
3032
RSYNC_FLAGS+=" --exclude=CMakeFiles/"
3133

3234
set -x
33-
ssh $DEVICE mkdir -p "$BUILDDIR"
35+
$CLIENT $DEVICE mkdir -p "$BUILDDIR"
3436
eval rsync $RSYNC_FLAGS $BUILDDIR/ $DEVICE:$BUILDDIR/

0 commit comments

Comments
 (0)