summaryrefslogtreecommitdiffhomepage
path: root/scripts/benchmark.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/benchmark.sh')
-rwxr-xr-x[-rw-r--r--]scripts/benchmark.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh
index 334684675..e0f6df438 100644..100755
--- a/scripts/benchmark.sh
+++ b/scripts/benchmark.sh
@@ -16,6 +16,15 @@
source $(dirname $0)/common.sh
+# gcloud may be installed as a "snap". If it is, include it in PATH.
+declare -r snap="/snap/bin"
+if [[ -d "${snap}" ]]; then
+ export PATH="${PATH}:${snap}"
+fi
+
+# Make sure we can find gcloud and exit if not.
+which gcloud
+
# Exporting for subprocesses as GCP APIs and tools check this environmental
# variable for authentication.
export GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_KEYSTORE_DIR}/${GCLOUD_CREDENTIALS}"