Skip to content
Snippets Groups Projects
Commit 82e6bf12 authored by Ben Gamari's avatar Ben Gamari
Browse files

ci/test-metrics: Clean up various bash quoting issues

(cherry picked from commit 91cd1248)
parent 7fa8a0a5
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ fail() { ...@@ -17,7 +17,7 @@ fail() {
function pull() { function pull() {
local ref="refs/notes/$REF" local ref="refs/notes/$REF"
run git fetch -f $NOTES_ORIGIN $ref:$ref run git fetch -f "$NOTES_ORIGIN" "$ref:$ref"
echo "perf notes ref $ref is $(git rev-parse $ref)" echo "perf notes ref $ref is $(git rev-parse $ref)"
} }
...@@ -25,8 +25,8 @@ function pull() { ...@@ -25,8 +25,8 @@ function pull() {
# This is favoured over a git notes merge as it avoids potential data loss/duplication from the merge strategy. # This is favoured over a git notes merge as it avoids potential data loss/duplication from the merge strategy.
function reset_append_note_push { function reset_append_note_push {
pull || true pull || true
run git notes --ref=$REF append -F $METRICS_FILE HEAD run git notes --ref="$REF" append -F "$METRICS_FILE" HEAD
run git push $PERF_NOTES_PUSH_REPO refs/notes/$REF run git push "$PERF_NOTES_PUSH_REPO" "refs/notes/$REF"
} }
function push() { function push() {
...@@ -41,17 +41,17 @@ function push() { ...@@ -41,17 +41,17 @@ function push() {
fi fi
# TEST_ENV must be set. # TEST_ENV must be set.
if [ -z ${TEST_ENV+"$TEST_ENV"} ] if [ -z "${TEST_ENV:-}" ]
then then
fail "Not pushing performance git notes: TEST_ENV must be set." fail "Not pushing performance git notes: TEST_ENV must be set."
fi fi
# Assert that the METRICS_FILE exists and can be read. # Assert that the METRICS_FILE exists and can be read.
if [ -z ${METRICS_FILE+"$METRICS_FILE"} ] if [ -z "${METRICS_FILE:-}" ]
then then
fail "\$METRICS_FILE not set." fail "\$METRICS_FILE not set."
fi fi
if ! [ -r $METRICS_FILE ] if ! [ -r "$METRICS_FILE" ]
then then
fail "Metrics file not found: $METRICS_FILE" fail "Metrics file not found: $METRICS_FILE"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment