summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Alfonsi <laurent.alfonsi@linaro.org>2023-05-03 13:38:49 +0200
committerLaurent Alfonsi <laurent.alfonsi@linaro.org>2023-05-08 18:08:46 +0000
commitb574f0ad65fedf057ee83389aa5a3f94cf128075 (patch)
treebf71d1d81fe8326b42d0ab2d9c64c6b99fddb1a7
parent549a4b32292a1c7312570843deb9e82f28a89a16 (diff)
jenkins-helpers.sh,round-robin.sh: get_baseline_xxx functions can be used with another baseline directory
round-robin.sh always uses "base-artifacts" directly. I didn't change it to rr[base_artifacts], as useless. Purpose of this change is to be able to use a different baseline directory when used from round-robin-notify.sh Change-Id: I7f8edca8565c1c8dd0c5cf0fe27d46c16b9c304f
-rw-r--r--jenkins-helpers.sh9
-rw-r--r--round-robin.sh3
2 files changed, 8 insertions, 4 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index 7e84eb40..d927c24c 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -904,12 +904,13 @@ get_baseline_manifest ()
(
set +x
set -euf -o pipefail
+ local base_artifacts=${rr[base_artifacts]}
unset rr
declare -A rr
# Emtpy result if no manifest found (udpate_baseline=init for instance)
- if [ -f base-artifacts/manifest.sh ]; then
+ if [ -f $base_artifacts/manifest.sh ]; then
# shellcheck disable=SC1090
- source base-artifacts/manifest.sh
+ source $base_artifacts/manifest.sh
eval echo "\$$1"
fi
)
@@ -936,8 +937,8 @@ get_baseline_git ()
(
set -euf -o pipefail
assert_with_msg "ERROR: No $1 in baseline git" \
- [ -f "base-artifacts/git/$1" ]
- cat "base-artifacts/git/$1"
+ [ -f "${rr[base_artifacts]}/git/$1" ]
+ cat "${rr[base_artifacts]}/git/$1"
)
}
diff --git a/round-robin.sh b/round-robin.sh
index 50af8d6a..f19ee63c 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -43,6 +43,9 @@ declare -gA rr
# Top-level artifacts directory.
#rr[top_artifacts]="$top_artifacts"
+# base-artifacts directory.
+rr[base_artifacts]="base-artifacts"
+
# Predicate function to determine whether there is regression between
# 2 sets of results.
# shellcheck disable=SC2154