summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-06-19 15:11:55 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-06-19 15:11:55 +0000
commit73cd586241c99731bbcad808c4c40f91da3dbcb0 (patch)
treeeb02a1f5e92b8bd9a8264e4ec65072b93d8b1957
parent472672bdcc6fbb84bff15ad8914bd4ad36955fc4 (diff)
downloadjenkins-scripts-73cd586241c99731bbcad808c4c40f91da3dbcb0.tar.gz
tcwg-generate-source-cache.sh: Handle git cache for SPEC CPU2xxx benchmarks
Change-Id: I2d20c4d24f011e3e9c2deb529ddfef82b63b228e
-rwxr-xr-xtcwg-generate-source-cache.sh42
1 files changed, 34 insertions, 8 deletions
diff --git a/tcwg-generate-source-cache.sh b/tcwg-generate-source-cache.sh
index e73c3c85..afe71a61 100755
--- a/tcwg-generate-source-cache.sh
+++ b/tcwg-generate-source-cache.sh
@@ -27,6 +27,7 @@ declare -g cache_dir
abe_branch="${abe_branch-tested}"
generate_abe="${generate_abe-true}"
+generate_bmk="${generate_bmk-false}"
generate_misc="${generate_misc-true}"
update_abe_git="${update_abe_git-true}"
verbose="${verbose-false}"
@@ -75,6 +76,38 @@ generate_abe_snapshots ()
done
}
+# Checkout git repos
+generate_git_cache ()
+{
+ set -e
+ $verbose
+
+ for repo in "$@"; do
+ dir=$(basename $repo)
+ dir=$cache_dir/$dir
+ if [ ! -d $dir/.git ]; then
+ rm -rf $dir
+ run_with_timeout_and_retry 1h 3 git clone --no-checkout $repo $dir
+ fi
+ done
+}
+
+# Checkout bmk repos
+generate_bmk_cache ()
+{
+ set -e
+ $verbose
+
+ # Clone the Linux kernel and LLVM monorepo.
+ # Subsequent calls will update it.
+ repos=(
+ ssh://dev-private-git.linaro.org/restricted-benchmarks/CPU2000.git
+ ssh://dev-private-git.linaro.org/restricted-benchmarks/CPU2006.git
+ ssh://dev-private-git.linaro.org/restricted-benchmarks/CPU2017.git
+ )
+ generate_git_cache "${repos[@]}"
+}
+
# Checkout other repos that we might need
generate_misc_files ()
{
@@ -94,14 +127,7 @@ generate_misc_files ()
https://github.com/llvm/llvm-project.git
https://git.linaro.org/toolchain/jenkins-scripts.git
)
- for repo in "${repos[@]}"; do
- dir=$(basename $repo)
- dir=$cache_dir/$dir
- if [ ! -d $dir/.git ]; then
- rm -rf $dir
- run_with_timeout_and_retry 1h 3 git clone --no-checkout $repo $dir
- fi
- done
+ generate_git_cache "${repos[@]}"
}
update_git_repos () {