
The job is considered to be credible when its' state = finished. Return true early and no need to search for error filename. Signed-off-by: Lin Jiaxin <ljx.joe@qq.com> --- lib/compare_error_messages.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/compare_error_messages.rb b/lib/compare_error_messages.rb index 5f74be7..978d6ba 100644 --- a/lib/compare_error_messages.rb +++ b/lib/compare_error_messages.rb @@ -14,6 +14,8 @@ require_relative "#{ENV['LKP_SRC']}/lib/common" def credible?(previous_job_id, later_job_id, error_id) es = ESQuery.new + return true if es.query_by_id(later_job_id)['job_state'] == 'finished' + previous_result_file = File.join('/srv', es.query_by_id(previous_job_id)['result_root'], 'build-pkg') later_result_file = File.join('/srv', es.query_by_id(later_job_id)['result_root'], 'build-pkg') -- 2.23.0