summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2020-03-05 11:18:54 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2020-03-11 10:23:24 +0000
commit73c89ab411102bb4627505de7a617ee8fe372657 (patch)
treebf73c4da7956978bef68f3c40a81d7f3ab358a6e
parent170d72fbc6ea94f1224e460d2e34a6b13f018f0a (diff)
Add annotations to round-robin's "results" file
Annotations provide human-readable comments and data on regressions. For this we ignore all lines in "results" file starting with "#". Change-Id: I31328fe2c13895a7379137b00891a9d2fc0a39d7
-rw-r--r--jenkins-helpers.sh2
-rw-r--r--round-robin.sh8
-rwxr-xr-xtcwg_bmk-build.sh11
-rwxr-xr-xtcwg_kernel-build.sh10
4 files changed, 18 insertions, 13 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index e2964772..aea10d88 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -1264,7 +1264,7 @@ run_step ()
if [ x"$run_step_status" = x"0" -a x"$success_result" != x"x" ]; then
cat >> $run_step_top_artifacts/results <<EOF
-${step[@]}:
+# ${step[@]}:
$success_result
EOF
fi
diff --git a/round-robin.sh b/round-robin.sh
index f91109bf..3f739df7 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -477,8 +477,8 @@ no_build_regression_p ()
fi
local build_result_ref build_result_new
- build_result_ref=$(tail -n1 $ref_artifacts/results)
- build_result_new=$(tail -n1 $new_artifacts/results)
+ build_result_ref=$(grep -v "^#" $ref_artifacts/results | tail -n1)
+ build_result_new=$(grep -v "^#" $new_artifacts/results | tail -n1)
# In log scan for errors below
# - sed -e 's/"[^"]*"//g' -- removes quoted "error: app diagnostics" strings
@@ -506,7 +506,7 @@ check_regression ()
set -euf -o pipefail
local score
- score=$(tail -n1 ${rr[top_artifacts]}/results)
+ score=$(grep -v "^#" ${rr[top_artifacts]}/results | tail -n1)
if [ x"${rr[update_baseline]}" = x"rebase" ]; then
# No-one ever used "rebase" mode. It's now obsoleted by custom ci_projects.
@@ -686,7 +686,7 @@ update_baseline ()
else
msg_title="$msg_title: $(print_updated_components "-")"
fi
- msg_title="$msg_title: $(tail -n1 ${rr[top_artifacts]}/results)"
+ msg_title="$msg_title: $(grep -v "^#" ${rr[top_artifacts]}/results | tail -n1)"
git -C base-artifacts add .
git -C base-artifacts commit $amend -m "$msg_title
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh
index 7152d485..e066e3a3 100755
--- a/tcwg_bmk-build.sh
+++ b/tcwg_bmk-build.sh
@@ -243,6 +243,7 @@ compare_results ()
local ref_results_id="$1"
local new_results_id="$2"
local cmp_options="$3"
+ local annotate_results="$4"
local results_ref results_new
results_ref=$(cat $ref_results_id)
@@ -304,6 +305,9 @@ compare_results ()
esac
if ! [ "$metric" -le "$threshold" ]; then
result=100
+ if $annotate_results; then
+ echo "# $bmk,$symbol regressed by $metric" >> $run_step_top_artifacts/results
+ fi
else
result=1
fi
@@ -337,7 +341,7 @@ no_regression_vs_p ()
if ! [ -f "$ref_artifacts/results_id-1" -a -f "$ref_artifacts/results_id-2" ]; then
return 0
fi
- compare_results "$ref_artifacts/results_id-1" "$ref_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0"
+ compare_results "$ref_artifacts/results_id-1" "$ref_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0" false
for i in $(find $run_step_artifacts/ -type f -name "results*"); do
mv $i $(dirname $i)/ref-$(basename $i)
done
@@ -346,7 +350,7 @@ no_regression_vs_p ()
if ! [ -f "$new_artifacts/results_id-1" -a -f "$new_artifacts/results_id-2" ]; then
return 1
fi
- compare_results "$new_artifacts/results_id-1" "$new_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0"
+ compare_results "$new_artifacts/results_id-1" "$new_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0" false
for i in $(find $run_step_artifacts/ -type f -name "results*"); do
mv $i $(dirname $i)/new-$(basename $i)
done
@@ -385,6 +389,7 @@ no_regression_vs_p ()
result=${arr[2]}
if ! [ "$result" -le "5000" ]; then
echo "Regression in $bmk,$symbol" | tee -a $new_artifacts/regressions.txt
+ echo "# $bmk,$symbol regressed" >> $new_artifacts/results
status=1
if [ x"$bmk" != x"$prev_bmk" ]; then
bisect_bmks+=("++benchmarks" "$bmk")
@@ -419,7 +424,7 @@ no_regression_to_base_p ()
case "${cflags[0]}" in
*"_LTO"*) compare_opts="--num_symbols 0 --entry_threshold 10" ;;
esac
- compare_results "$ref_artifacts/results_id" "$new_artifacts/results_id" "$compare_opts"
+ compare_results "$ref_artifacts/results_id" "$new_artifacts/results_id" "$compare_opts" true
local bmk symbol result status prev_bmk
local -a bisect_bmks
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index f23bae86..5469c7ea 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -165,11 +165,11 @@ build_linux ()
# Number of .o files created is the main success metric.
local linux_n_obj
linux_n_obj=$(find linux -name "*.o" | wc -l)
- echo "linux_n_obj:" >> ${rr[top_artifacts]}/results
+ echo "# linux_n_obj:" >> ${rr[top_artifacts]}/results
echo "$linux_n_obj" >> ${rr[top_artifacts]}/results
if [ $res = 0 ]; then
- echo "linux build successful:" >> ${rr[top_artifacts]}/results
+ echo "# linux build successful:" >> ${rr[top_artifacts]}/results
echo "all" >> ${rr[top_artifacts]}/results
fi
@@ -200,7 +200,7 @@ boot_linux ()
-serial stdio -display none \
-append "console=ttyAMA0 panic=-1" -no-reboot
- echo "linux boot successful:" >> ${rr[top_artifacts]}/results
+ echo "# linux boot successful:" >> ${rr[top_artifacts]}/results
echo "boot" >> ${rr[top_artifacts]}/results
)
}
@@ -215,12 +215,12 @@ no_regression_p ()
local new_artifacts=$2
local linux_n_obj
- linux_n_obj=$(tail -n1 $new_artifacts/results)
+ linux_n_obj=$(grep -v "^#" $new_artifacts/results | tail -n1)
# Assume worst for non-existent baseline.
local base_linux_n_obj="-10"
if [ -f $ref_artifacts/results ]; then
- base_linux_n_obj=$(tail -n1 $ref_artifacts/results)
+ base_linux_n_obj=$(grep -v "^#" $ref_artifacts/results | tail -n1)
fi
# In log scan for errors below