Signed-off-by: Wang Chenglong <18509160991(a)163.com>
---
stats/ansible_test | 43 +++++++++++++++++++++++++++----------------
1 file changed, 27 insertions(+), 16 deletions(-)
diff --git a/stats/ansible_test b/stats/ansible_test
index 664fd53e0..0cbad6519 100755
--- a/stats/ansible_test
+++ b/stats/ansible_test
@@ -52,7 +52,7 @@ def parse_msg(ansible_failed_json)
output_error $1
when /(Could not find .*):/
output_error $1
- when /(Unsupported parameters) for/
+ when /(Unsupported parameters for.*module):/
output_error $1
when /aajdhch/
output_error $1
@@ -66,6 +66,14 @@ def parse_msg(ansible_failed_json)
output_error $1
when /(Unable to stop.*):/
output_error $1
+ when /AnsibleUndefinedVariable: (.*)/
+ output_error $1
+ when /(Failed to find handler .*)"\./
+ output_error $1
+ when /(Connection failure: .*)/
+ output_error $1
+ when /(Docker .*)\. /
+ output_error $1
when /non-zero return code|Failed to install some of the specified packages/
return
else
@@ -82,7 +90,8 @@ def parse_stderr(ansible_failed_json)
output_error "gcc: Make error"
else
ansible_failed_json['stderr_lines'].each do |i|
- next if i =~ /^ .*\~.*|^ .*\^$/
+ next if i =~ /^ .*\~.*|^ .*\^$|\*.*/
+ next if i =~ /Problems in request/
output_error i
end
@@ -109,21 +118,23 @@ def parse_failures(ansible_failed_json)
end
def parse_stdout(ansible_failed_json)
- case ansible_failed_json['stdout']
- when ansible_failed_json.nil?
- return
- when ansible_failed_json['cmd'] =~ /make install/
- return
- else
- ansible_failed_json['stdout_lines'].each do |i|
- next if i =~ /^$/
- next if ansible_failed_json['cmd'] =~ /make install/
- next if i =~ /Last metadata expiration/
- next if i =~ /^##.*/
- next if i =~ /^\+.*/
+ if ansible_failed_json['stderr_lines'].nil?
+ case ansible_failed_json['stdout']
+ when ansible_failed_json.nil?
+ return
+ when ansible_failed_json['cmd'] =~ /make install/
+ return
+ else
+ ansible_failed_json['stdout_lines'].each do |i|
+ next if i =~ /^$/
+ next if ansible_failed_json['cmd'] =~ /make install/
+ next if i =~ /Last metadata expiration/
+ next if i =~ /^##.*|^#.*/
+ next if i =~ /^\+.*/
- output_error i
- end
+ output_error i
+ end
+ end
end
end
--
2.23.0