Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions build-scripts/test-on-testmachine
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,28 @@ INCLUDES='--include=test.* --include=summary.*'
# Note: Don't use sudo or "rsync -a", because we don't want root-owned files
# to show up in the results.
log_debug "Collecting test results from core repo..."
rsync -rv "$INCLUDES" --exclude="*" \
# shellcheck disable=SC2086
# > Double quote to prevent globbing and word splitting.
# We want word splitting
rsync -rv $INCLUDES --exclude="*" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double-check that the * is not expanded locally without quotes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? The quotes are there to prevent globbing. And they should be there? At least they have been there for over 10 years without any trouble.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the * from here INCLUDES='--include=test.* --include=summary.*' ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way, I think it will be fine. I recently added double quotes on the INCLUDES variable expansion to fix shellcheck warnings. And the quotes should not really have been there. Now, I'm just putting things back to the way they where and disabling the shellcheck warnings from those lines.

"$TESTMACHINE_URI$BASEDIR"/core/tests/acceptance/ \
"$BASEDIR"/core/tests/acceptance/ \
>>/tmp/rsync.log

if [ "$PROJECT" = nova ]; then
log_debug "Collecting test results from enterprise repo..."
rsync -rv "$INCLUDES" --exclude="*" \
# shellcheck disable=SC2086
# > Double quote to prevent globbing and word splitting.
# We want word splitting
rsync -rv $INCLUDES --exclude="*" \
"$TESTMACHINE_URI$BASEDIR"/enterprise/tests/acceptance/ \
"$BASEDIR"/enterprise/tests/acceptance/ \
>>/tmp/rsync.log
log_debug "Collecting test results from masterfiles repo..."
rsync -rv "$INCLUDES" --exclude="*" \
# shellcheck disable=SC2086
# > Double quote to prevent globbing and word splitting.
# We want word splitting
rsync -rv $INCLUDES --exclude="*" \
"$TESTMACHINE_URI$BASEDIR"/masterfiles/tests/acceptance/ \
"$BASEDIR"/masterfiles/tests/acceptance/ \
>>/tmp/rsync.log
Expand Down