Skip to content

Commit 7ee5b3d

Browse files
committed
Fixed bad quoting of variable expansions
You would normally use double quotes when expanding variables to prevent word splitting. However, these variables contain options to `rsync`, hence we want word splitting to occur. This should fix the issue where no test results are reported to the Jenkins CI. Signed-off-by: Lars Erik Wik <[email protected]>
1 parent a253903 commit 7ee5b3d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

build-scripts/test-on-testmachine

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,28 @@ INCLUDES='--include=test.* --include=summary.*'
9595
# Note: Don't use sudo or "rsync -a", because we don't want root-owned files
9696
# to show up in the results.
9797
log_debug "Collecting test results from core repo..."
98-
rsync -rv "$INCLUDES" --exclude="*" \
98+
# shellcheck disable=SC2086
99+
# > Double quote to prevent globbing and word splitting.
100+
# We want word splitting
101+
rsync -rv $INCLUDES --exclude="*" \
99102
"$TESTMACHINE_URI$BASEDIR"/core/tests/acceptance/ \
100103
"$BASEDIR"/core/tests/acceptance/ \
101104
>>/tmp/rsync.log
102105

103106
if [ "$PROJECT" = nova ]; then
104107
log_debug "Collecting test results from enterprise repo..."
105-
rsync -rv "$INCLUDES" --exclude="*" \
108+
# shellcheck disable=SC2086
109+
# > Double quote to prevent globbing and word splitting.
110+
# We want word splitting
111+
rsync -rv $INCLUDES --exclude="*" \
106112
"$TESTMACHINE_URI$BASEDIR"/enterprise/tests/acceptance/ \
107113
"$BASEDIR"/enterprise/tests/acceptance/ \
108114
>>/tmp/rsync.log
109115
log_debug "Collecting test results from masterfiles repo..."
110-
rsync -rv "$INCLUDES" --exclude="*" \
116+
# shellcheck disable=SC2086
117+
# > Double quote to prevent globbing and word splitting.
118+
# We want word splitting
119+
rsync -rv $INCLUDES --exclude="*" \
111120
"$TESTMACHINE_URI$BASEDIR"/masterfiles/tests/acceptance/ \
112121
"$BASEDIR"/masterfiles/tests/acceptance/ \
113122
>>/tmp/rsync.log

0 commit comments

Comments
 (0)