File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
test/truffle/compiler/graphs Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 3
3
$tests = 0
4
4
$failures = 0
5
5
6
- def test ( program , extra = '' , shape_expected )
6
+ def test ( program , shape_expected )
7
7
$tests += 1
8
- output = `bin/jt -q graph --json --describe #{ program } #{ extra } `
8
+ command = "bin/jt -q graph --json --describe #{ program } "
9
+ output = `#{ command } `
10
+ unless $?. success?
11
+ abort "`#{ command } ` failed (#{ $?} ).\n Output:\n #{ output } \n "
12
+ end
9
13
last_line = output . lines . last . strip
10
14
11
15
begin
12
16
decoded = JSON . parse ( last_line , symbolize_names : true )
13
17
rescue JSON ::ParserError => e
14
- abort "#{ program } : could not parse JSON (#{ e } ):\n #{ output } "
18
+ abort "ERROR: Could not parse JSON from command `#{ command } ` (#{ e } ).\n " \
19
+ "JSON line:\n #{ last_line } \n Full output:\n #{ output } \n "
15
20
end
16
21
17
22
shape_got = decoded
You can’t perform that action at this time.
0 commit comments