summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-09-15 19:01:28 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-09-15 19:01:28 +0000
commit2d2a0653ac84c84ff6af4abc55f9090162753e58 (patch)
tree47b75c4858a16a498ffed604d42055ec2f473d51
parent3329f7c68c9dc2ce3e86fa39b7df5bc5a365af4b (diff)
tcwg_bmk-build.sh: Publish save-temps for SPEC CPU2xxx benchmarks
Change-Id: Ie8857b7ef49dd04609efe27fa46431e3ee9a7af0
-rwxr-xr-xround-robin-bisect.sh24
-rw-r--r--round-robin.sh15
-rwxr-xr-xtcwg_bmk-build.sh40
3 files changed, 64 insertions, 15 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index 1339572d..2e290718 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -711,9 +711,9 @@ $(cat $artifacts/build-$first_bad/mail/mail-body.txt)
This commit has regressed these CI configurations:
$occurences
-First_bad build: ${BUILD_URL}artifact/$rel_artifacts/build-$first_bad/
-Last_good build: ${BUILD_URL}artifact/$rel_artifacts/build-$last_good/
-Baseline build: ${BUILD_URL}artifact/$rel_artifacts/build-baseline/
+First_bad build: \$FIRST_BAD_ARTIFACTS/
+Last_good build: \$LAST_GOOD_ARTIFACTS/
+Baseline build: \$BASELINE_ARTIFACTS/
Even more details: ${BUILD_URL}artifact/$rel_artifacts/
Reproduce builds:
@@ -806,12 +806,18 @@ ${CI_MAIL_RECIPIENTS[*]}
EOF
)
- mv $artifacts/jenkins/mail-recipients.draft \
- $artifacts/jenkins/mail-recipients.txt
- mv $artifacts/jenkins/mail-subject.draft \
- $artifacts/jenkins/mail-subject.txt
- mv $artifacts/jenkins/mail-body.draft \
- $artifacts/jenkins/mail-body.txt
+ (
+ for i in mail-recipients mail-subject mail-body; do
+ FIRST_BAD_ARTIFACTS=${BUILD_URL}artifact/$rel_artifacts/build-$first_bad
+ export FIRST_BAD_ARTIFACTS
+ LAST_GOOD_ARTIFACTS=${BUILD_URL}artifact/$rel_artifacts/build-$last_good
+ export LAST_GOOD_ARTIFACTS
+ BASELINE_ARTIFACTS=${BUILD_URL}artifact/$rel_artifacts/build-baseline
+ export BASELINE_ARTIFACTS
+ envsubst '$FIRST_BAD_ARTIFACTS $LAST_GOOD_ARTIFACTS $BASELINE_ARTIFACTS' \
+ < $artifacts/jenkins/$i.draft > $artifacts/jenkins/$i.txt
+ done
+ )
else
# Remove any fail-safe email stubs
echo > $artifacts/jenkins/mail-recipients.txt
diff --git a/round-robin.sh b/round-robin.sh
index 4f4db645..aa67c95f 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -595,9 +595,19 @@ check_regression ()
exit $EXTERNAL_FAIL
fi
+ local res
+
# Generate comparison artifacts for update, reset, init and push modes.
${rr[no_regression_p]} base-artifacts ${rr[top_artifacts]} &
- if wait $!; then
+ res=0 && wait $! || res=$?
+
+ # Move extra artifacts that no_regression_p generated to $top_artifacts.
+ if [ -d $run_step_artifacts/top_artifacts ]; then
+ rsync -a $run_step_artifacts/top_artifacts/ ${rr[top_artifacts]}/
+ rm -rf $run_step_artifacts/top_artifacts
+ fi
+
+ if [ $res = 0 ]; then
# All good, no regression
return
fi
@@ -704,7 +714,8 @@ EOF
COMMIT_LOG=$(git -C $single_component log --pretty=short -n 1 HEAD)
export COMMIT_LOG
for i in mail-subject.txt jira-body.txt mail-body.txt; do
- envsubst < $run_step_artifacts/$i > $mail_dir/$i
+ envsubst '$COMMIT_COMPONENT $COMMIT_SUBJECT $COMMIT_LOG' \
+ < $run_step_artifacts/$i > $mail_dir/$i
done
)
fi
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh
index 3969798e..82b00fce 100755
--- a/tcwg_bmk-build.sh
+++ b/tcwg_bmk-build.sh
@@ -488,13 +488,45 @@ EOF
cp $run_step_artifacts/jira-body.txt $run_step_artifacts/mail-body.txt
- local bmk_suite=""
- local compiler="" libc="" linker="" version="" target="" bmk_flags="" hw=""
+ local bmk_suite="" publish_save_temps=false
case "${benchmarks[*]}" in
coremark) bmk_suite="EEMBC CoreMark" ;;
- spec2k6|4*) bmk_suite="SPEC CPU2006" ;;
- spec2017|5*|6*) bmk_suite="SPEC CPU2017" ;;
+ spec2k6|4*)
+ bmk_suite="SPEC CPU2006"
+ publish_save_temps=true
+ ;;
+ spec2017|5*|6*)
+ bmk_suite="SPEC CPU2017"
+ publish_save_temps=true
+ ;;
esac
+
+ cat >> $run_step_artifacts/mail-body.txt <<EOF
+
+Below reproducer instructions can be used to re-build both "first_bad" and "last_good" cross-toolchains used in this bisection. Naturally, the scripts will fail when triggerring benchmarking jobs if you don't have access to Linaro TCWG CI.
+EOF
+
+ # Copy save-temps tarballs to artifacts, so that they are accessible.
+ # We can publish pre-processed source only for benchmarks derived from
+ # open-source projects.
+ if $publish_save_temps; then
+ local s_t
+ while read s_t; do
+ rsync -a "$s_t/" $run_step_artifacts/top-artifacts/save-temps/
+ done < <(find results-1 -type d -name "save.*.temps")
+ fi
+
+ if [ -d $run_step_artifacts/save-temps/ ]; then
+ cat >> $run_step_artifacts/mail-body.txt <<EOF
+
+For your convenience, we have uploaded tarballs with pre-processed source and assembly files at
+First_bad save-temps: \$FIRST_BAD_ARTIFACTS/save-temps/
+Last_good save-temps: \$LAST_GOOD_ARTIFACTS/save-temps/
+Baseline save-temps: \$BASELINE_ARTIFACTS/save-temps/
+EOF
+ fi
+
+ local compiler="" libc="" linker="" version="" target="" bmk_flags="" hw=""
case "${rr[toolchain]}" in
gnu)
compiler="GCC"