forked from oracle/truffleruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fail-if-any-failed.rb
executable file
·73 lines (63 loc) · 2.91 KB
/
fail-if-any-failed.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env ruby
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
# This code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 2.0, or
# GNU General Public License version 2, or
# GNU Lesser General Public License version 2.1.
require 'json'
result = JSON.parse(File.read(ARGV[0]))
wait = ARGV[1] == '--wait'
failures = []
known_failures = [
# OOM in flattenBytes
["server", "graal-core", "jruby", "truffle", "micro", "micro/file/read.rb:core-read-gigabyte"],
["server", "graal-enterprise", "jruby", "truffle", "micro", "micro/file/read.rb:core-read-gigabyte"],
["server", "graal-enterprise-no-om", "jruby", "truffle", "micro", "micro/file/read.rb:core-read-gigabyte"],
# C-exts
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-color-r"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-color-g"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-color-b"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-color-a"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-color-compose-quick"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-canvas-resampling-bilinear"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-canvas-resampling-nearest-neighbor"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-canvas-resampling-steps-residues"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-canvas-resampling-steps"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-decode-png-image-pass"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-encode-png-image-pass-to-stream"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-operations-compose"],
["server", "graal-core", "jruby", "truffle-cexts", "chunky", "chunky-operations-replace"],
# JRuby
["server", "default", "jruby", "indy", "micro", "micro/file/read.rb:core-read-gigabyte"]
]
if File.exist?('failures')
failures = File.read('failures').split("\n").map { |failure| eval(failure) }
else
failures = []
end
(result['queries'] || []).any? do |q|
if q['error'] == 'failed'
failures.push [q['host-vm'], q['host-vm-config'], q['guest-vm'], q['guest-vm-config'], q['bench-suite'], q['benchmark']]
end
end
known_failures.each do |known_failure|
if failures.delete(known_failure)
STDERR.puts "#{known_failure.inspect} failed, but we know about that"
end
end
if wait
if !failures.empty?
STDERR.puts 'waiting to return failure...'
File.write('failures', failures.map(&:inspect).join("\n"))
end
else
if !failures.empty? || File.exist?('failures')
STDERR.puts 'these failed:'
failures.each do |failure|
STDERR.puts failure.inspect
end
exit 1
end
end