On Thu, Jan 28, 2021 at 07:30:29PM +0800, Wu Zhende wrote:
- The fail/error/warning cases should not take input from stderr.*
stderr is rather chaotic -- let it stay in any_stderr.
- The warning match should be more exact. Avoid matching nr_warning
So does error Don't use stderr.* as examples for them.
Signed-off-by: Wu Zhende wuzhende666@163.com
lib/es_jobs.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/lib/es_jobs.rb b/lib/es_jobs.rb index e367a91..9e0c671 100644 --- a/lib/es_jobs.rb +++ b/lib/es_jobs.rb @@ -33,29 +33,30 @@ class ESJobs def set_job_summary(stats, job) summary_result = '' stats.each_key do |stat|
# "stderr.warning:rubygems_will_be_installed_before_its_ruby_dependency": 1,
# "stderr._#warning_FORTIFY_SOURCE_requires_compiling_with_optimization(-O)": 1,
# "stderr.disk_src.c:#:#:warning:incompatible_implicit_declaration_of_built-in_function'strcpy'": 1,
if stat.match(/warning/i)
job['summary.any_warning'] = 1
summary_result = 'warning'
end # "stderr.linux-perf": 1, # "stderr.error:target_not_found:ruby-dev": 1, # "stderr.error:could_not_open_file/var/lib/pacman/local/ldb-#:#-#/desc:Not_a_directory": 1, if stat.match(/stderr\./i) job['summary.any_stderr'] = 1 summary_result = 'stderr'
next end
# "stderr.::Proceed_with_installation?[Y/n]error:target_not_found:liblzma-dev": 1,
# "stderr.==>ERROR:Failure_while_downloading_apache-cassandra": 1,
# "stderr.ftq.h:#:#:error:unknown_type_name'ticks'": 1,
# sum.stats.build-pkg.mb_cache.c:warning:‘read_cache’defined-but-not-used[-Wunused-function]: 1
# sum.stats.build-pkg.mb_cache.c:warning:control-reaches-end-of-non-void-function[-Wreturn-type]: 1
if stat.match(/warning/i) && !stat.match(/nr_warning/i)
精确匹配已知的几种:
/:warning:/ /.warning$/
或者稍微general一些: /<warning>/
job['summary.any_warning'] = 1
summary_result = 'warning'
end
# "last_state.test.iperf.exit_code.127": 1, # "last_state.test.cci-makepkg.exit_code.1": 1,
if stat.match(/error|\.exit_code\./i)
# sum.stats.build-pkg.cc1plus:error:unrecognized-command-line-option‘-Wno-unknown-warning-option’[-Werror]: 2
if stat.match(/error|\.exit_code\./i) && !stat.match(/nr_error/i)
ditto.
job['summary.any_error'] = 1 summary_result = 'error' end
if stat.match(/\.fail$/i) job['summary.any_fail'] = 1 summary_result = 'fail'
-- 2.23.0