summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--round-robin.sh28
-rwxr-xr-xtcwg_kernel-build.sh13
2 files changed, 29 insertions, 12 deletions
diff --git a/round-robin.sh b/round-robin.sh
index 278c9b07..e257b776 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -59,7 +59,11 @@ reset_artifacts ()
# steps.
# TODO: base-artifacts repo is starting to get big, so we should
# fetch only the $baseline branch, instead of all branches.
+ rr[base-artifacts_rev]="${rr[base-artifacts_rev]-${rr[baseline_branch]}}"
clone_or_update_repo base-artifacts ${rr[baseline_branch]} https://git-us.linaro.org/toolchain/ci/base-artifacts.git
+ cat <<EOF | manifest_out
+rr[base-artifacts_rev]=$(git_rev_parse_long base-artifacts HEAD)
+EOF
)
}
@@ -78,8 +82,8 @@ clone_repo ()
local branch
# Select the branch to build.
- # ${rr[current_rev]} specifies branch for ${rr[current_project]}, and everything else
- # uses baseline branch.
+ # ${rr[current_rev]} specifies branch for ${rr[current_project]},
+ # and everything else uses baseline branch.
if [ x"$project" = x"${rr[current_project]}" ]; then
if [ x"${rr[current_rev]}" = x"default" ]; then
branch=${rr[${current_project}_rev]}
@@ -88,6 +92,8 @@ clone_repo ()
else
branch=${rr[current_rev]}
fi
+ elif [ x"${rr[mode]}" = x"reproduce" ]; then
+ branch="${rr[${project}_rev]}"
else
branch="refs/remotes/baseline/${rr[baseline_branch]}"
fi
@@ -109,22 +115,24 @@ clone_repo ()
# Checkout, now that we have both origin and baseline remotes ready.
clone_or_update_repo $project $branch ${rr[${project}_url]} > /dev/null
- cd $project
+ local cur_rev
+ cur_rev=$(git_rev_parse_long $project HEAD)
- git rev-parse HEAD > $run_step_artifacts/revision
- if [ x"$project" = x"${rr[current_project]}" ]; then
- local baseline_rev bad_rev
+ cat <<EOF | manifest_out
+rr[${project}_rev]=$cur_rev
+EOF
- baseline_rev=$(git rev-parse refs/remotes/baseline/${rr[baseline_branch]})
- bad_rev=$(git rev-parse HEAD)
+ if [ x"$project" = x"${rr[current_project]}" ]; then
+ local baseline_rev
+ baseline_rev=$(git_rev_parse_long $project ${rr[baseline_branch]} baseline)
# Prepare for failure. If build fails we will bisect sha1 for
# ${rr[current_rev]} and sha1 for $baseline_rev.
cat > ${rr[top_artifacts]}/trigger-bisect-on-failure <<EOF
current_project=${rr[current_project]}
baseline_rev=$baseline_rev
-bad_rev=$bad_rev
+bad_rev=$cur_rev
EOF
- git rev-list --count HEAD ^$baseline_rev > ${rr[top_artifacts]}/distance-to-baseline
+ git -C $project rev-list --count HEAD ^$baseline_rev > ${rr[top_artifacts]}/distance-to-baseline
fi
)
}
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index 15cd9611..62389806 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -7,7 +7,7 @@ scripts=$(dirname $0)
convert_args_to_variables "$@"
-# Execution mode: baseline, jenkins-full, bisect, continue.
+# Execution mode: baseline, bisect, continue, jenkins-full, reproduce
mode="${mode-baseline}"
obligatory_variables toolchain \
@@ -28,6 +28,11 @@ case "$mode" in
;;
esac
+cat <<EOF | manifest_out
+mode=reproduce
+current_project=none
+EOF
+
# Set custom revision for one of the projects, and use baseline revisions
# for all other projects.
current_project="${current_project-none}"
@@ -71,9 +76,13 @@ case "$mode" in
;;
"continue")
# Developer mode.
- default_start_at="prepare_abe"
+ case "$toolchain" in
+ "gnu") default_start_at="prepare_abe" ;;
+ "llvm") default_start_at="build_llvm" ;;
+ esac
;;
"jenkins-full") ;;
+ "reproduce") default_finish_at="check_regression" ;;
esac
if [ x"$start_at" = x"default" ]; then