Skip to content

Commit 2e7babb

Browse files
committed
test-my-pr: if there are crashes then dont compare results and timings
1 parent 4401eba commit 2e7babb

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tools/test-my-pr.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,16 @@ def format_float(a, b=1):
187187
with open(result_file, 'a') as myfile:
188188
myfile.write(package + '\n')
189189
diff = lib.diff_results('main', results_to_diff[0], 'your', results_to_diff[1])
190-
if diff != '':
190+
if not main_crashed and not your_crashed and diff != '':
191191
myfile.write(f'libraries:{libraries}\n')
192192
myfile.write('diff:\n' + diff + '\n')
193193

194-
with open(timing_file, 'a') as myfile:
195-
myfile.write('{:{package_width}} {:{timing_width}} {:{timing_width}} {:{timing_width}}\n'.format(
196-
package, format_float(time_main),
197-
format_float(time_your), format_float(time_your, time_main),
198-
package_width=package_width, timing_width=timing_width))
194+
if not main_crashed and not your_crashed:
195+
with open(timing_file, 'a') as myfile:
196+
myfile.write('{:{package_width}} {:{timing_width}} {:{timing_width}} {:{timing_width}}\n'.format(
197+
package, format_float(time_main),
198+
format_float(time_your), format_float(time_your, time_main),
199+
package_width=package_width, timing_width=timing_width))
199200

200201
packages_processed += 1
201202
print(str(packages_processed) + ' of ' + str(args.p) + ' packages processed\n')

0 commit comments

Comments
 (0)