diff options
author | Laurent Alfonsi <laurent.alfonsi@linaro.org> | 2022-09-16 12:49:36 +0200 |
---|---|---|
committer | Laurent Alfonsi <laurent.alfonsi@linaro.org> | 2022-09-20 20:38:41 +0000 |
commit | 7064b75df6f8a3ad99e7efcffd59c09c382cfd66 (patch) | |
tree | 187cb806fd0711c34c99bded11e6290171d95721 | |
parent | 3dd861010692ed6179416e5d20cb136cdb7fca09 (diff) |
tcwg_bmk-build.sh: Generate comparison csv files even for first build
For first run (update_baseline=init), we compare the build against
itself.
Change-Id: I7054b7f6466f77e7d7a1164430cb831666f6d428
-rwxr-xr-x | tcwg_bmk-build.sh | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh index cd50ef1c..f18467fb 100755 --- a/tcwg_bmk-build.sh +++ b/tcwg_bmk-build.sh @@ -341,6 +341,7 @@ benchmark () echo "$results_id" | sed -e "s/@build_num@/$build_num/g" \ > "$results_id_file" + return $build_ret ) } @@ -772,21 +773,14 @@ no_regression_p () local ref_artifacts=$1 local new_artifacts=$2 - if ! [ -f "$ref_artifacts/results_id" ]; then - return 0 - fi - # <Workaround> missing reference results, which we have listed in - # tcwg-benchmark-results.broken-list. Once all entries referencing missing - # results are discarded, we'll remove this workaround. - # Otherwise compare_results will fail while fetching baseline results, - # and we'll consider this failure as a regression. - if cat "$scripts/tcwg-benchmark-results.broken-list" \ - | grep -q "^$(cat $ref_artifacts/results_id)\$"; then - return 0 - fi - # </Workaround> - if ! [ -f "$new_artifacts/results_id" ]; then - return 1 + # We always want to generate a comparison metrics (results-brief.csv), + # In case of a first run (update_baseline=init). we choosed to compare + # the obtained results against itself + if ! [ -f "$ref_artifacts/results_id" ] && [ -f "$new_artifacts/results_id" ]; then + # This case can happen in update_baseline="init" mode. Otherwise, there's a pb ! + assert_with_msg "Expecting a ref_artifact with a results_id file" \ + [ "${rr[update_baseline]}" == "init" ] + ref_artifacts=$new_artifacts fi # Make sure there is no stray results.regression file, which we use @@ -802,6 +796,8 @@ no_regression_p () esac compare_results "$metric_id" "$ref_artifacts/results_id" "$new_artifacts/results_id" "$compare_opts" if [ -f $run_step_artifacts/results.regressions ]; then + assert_with_msg "Found a regression while comparing the build against itself" \ + [ "$ref_artifacts" != "$new_artifacts" ] return 1 fi return 0 |