File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ def full_log
40
40
41
41
def can_compare_orca_tap?
42
42
return false unless has_orca_output?
43
+ return false unless grading_output_path . ends_with? ".tap"
44
+ return false unless orca_output_path . ends_with? ".tap"
45
+
43
46
!( self . bottlenose_tap . nil? || orca_output [ 'output' ] . nil? )
44
47
end
45
48
@@ -93,7 +96,13 @@ def has_orca_output?
93
96
94
97
def orca_output
95
98
return nil unless has_orca_output?
96
- JSON . parse ( File . open ( orca_result_path ) . read )
99
+ if orca_result_path . ends_with? ".json"
100
+ JSON . parse ( File . open ( orca_result_path ) . read )
101
+ elsif orca_result_path . ends_with? ".tap"
102
+ TapParser . new ( File . read ( orca_result_path ) )
103
+ else
104
+ File . read ( orca_result_path )
105
+ end
97
106
end
98
107
99
108
def orca_result_path
@@ -131,12 +140,12 @@ def tap_test_counts_match?
131
140
def orca_tap
132
141
return nil if orca_output . nil? || orca_output [ 'output' ] . nil?
133
142
134
- TapParser . new ( orca_output [ 'output' ] )
143
+ TapParser . new ( orca_output [ 'output' ] ) rescue false
135
144
end
136
145
137
146
def bottlenose_tap
138
147
return nil if self . grading_output . nil?
139
148
140
- TapParser . new ( File . read ( self . grading_output_path ) )
149
+ TapParser . new ( File . read ( self . grading_output_path ) ) rescue false
141
150
end
142
151
end
You can’t perform that action at this time.
0 commit comments