aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2018-02-14 15:31:09 +0530
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2018-02-14 10:46:54 +0000
commit7fb1cf695be59d04b741594c6f0b10ef5aca54e6 (patch)
tree72a928e583cc6f904b8702fccfe96faaf65e1955
parentdec38eedf2b503594cd32d15719bfe2377f6aaf1 (diff)
android: microbenchmarks: find the secrets file
SECRETS_FILE Token doesn't seem to point to the right file hence we find the file and use it. Change-Id: Ib6df0c177aa4bad6edef762f5cb7de27a59246c6 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-xautomated/android/microbenchmarks/microbenchmarks.sh6
-rw-r--r--automated/android/microbenchmarks/microbenchmarks.yaml1
2 files changed, 5 insertions, 2 deletions
diff --git a/automated/android/microbenchmarks/microbenchmarks.sh b/automated/android/microbenchmarks/microbenchmarks.sh
index 02dd9997..306b8035 100755
--- a/automated/android/microbenchmarks/microbenchmarks.sh
+++ b/automated/android/microbenchmarks/microbenchmarks.sh
@@ -1,6 +1,5 @@
#!/bin/sh -x
# shellcheck source=/<job-id>-0/secrets
-. "${SECRETS_FILE}"
export SOURCE_PROJECT_NAME
export SOURCE_BUILD_NUMBER
export SOURCE_BUILD_URL
@@ -12,6 +11,11 @@ export SOURCE_GERRIT_CHANGE_ID
export ART_URL
set +x
+lava_test_dir="$(find /lava-* -maxdepth 0 -type d -regex '/lava-[0-9]+' 2>/dev/null | sort | tail -1)"
+if test -f "${lava_test_dir}/secrets" && grep -q "ART_TOKEN" "${lava_test_dir}/secrets"; then
+ # shellcheck disable=SC1090
+ . "${lava_test_dir}/secrets"
+fi
export ART_TOKEN
set -x
diff --git a/automated/android/microbenchmarks/microbenchmarks.yaml b/automated/android/microbenchmarks/microbenchmarks.yaml
index 39ff2921..af589021 100644
--- a/automated/android/microbenchmarks/microbenchmarks.yaml
+++ b/automated/android/microbenchmarks/microbenchmarks.yaml
@@ -35,7 +35,6 @@ params:
run:
steps:
- - export SECRETS_FILE=${PWD}/../../../secrets
- cd ./automated/android/microbenchmarks
- . ./microbenchmarks.sh -s false
- tar -cJf artifacts.txz artifacts/