Fix 0 delta results in size_regression.sh (#17457)

This commit is contained in:
Dasky 2022-06-23 02:23:13 +01:00 committed by GitHub
parent 666cba5c2e
commit aaaf3ff66a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ function build_executor() {
if [[ -n "$last_line" ]] ; then if [[ -n "$last_line" ]] ; then
size_delta=$(( $last_size - $file_size )) size_delta=$(( $last_size - $file_size ))
if { [[ -n "${skip_zero:-}" ]] && [[ $size_delta -ne 0 ]] ; } || [[ $file_size -eq 0 ]] ; then if { [[ -n "${skip_zero:-}" ]] && [[ $size_delta -ne 0 ]] ; } || [[ -z "${skip_zero:-}" ]] || [[ $file_size -eq 0 ]] ; then
printf "Size: %8d, delta: %+6d -- %s\n" "$last_size" "$size_delta" "$last_line" printf "Size: %8d, delta: %+6d -- %s\n" "$last_size" "$size_delta" "$last_line"
fi fi
fi fi