16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/ceedling/generator_helper.rb', line 16
def test_crash?(test_filename, executable, shell_result)
runner = File.basename(executable)
crash = false
if (shell_result[:status].termsig == 11)
@loginator.log( "#{runner} process terminated with SIGSEGV (Unix Signal 11)", Verbosity::DEBUG, LogLabels::CRASH )
crash = true
end
if (shell_result[:output] =~ TEST_STDOUT_STATISTICS_PATTERN).nil?
crash = true
end
segfault_pattern = 'Seg.*fault'
regex = /\A(?!(?m).*^#{Regexp.escape(test_filename)}.*$).*(?:#{segfault_pattern})/mi
if shell_result[:stderr].match?(regex)
@loginator.log( "#{runner} STDERR reports segmentation fault", Verbosity::DEBUG, LogLabels::CRASH )
crash = true
end
return crash
end
|