From 2e7babbc8dfabd1b81b47f9dfdab5d1f7dae9a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 5 Sep 2022 20:17:38 +0200 Subject: [PATCH] test-my-pr: if there are crashes then dont compare results and timings --- tools/test-my-pr.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/test-my-pr.py b/tools/test-my-pr.py index 0a8fd6857..18da316ad 100755 --- a/tools/test-my-pr.py +++ b/tools/test-my-pr.py @@ -187,15 +187,16 @@ if __name__ == "__main__": with open(result_file, 'a') as myfile: myfile.write(package + '\n') diff = lib.diff_results('main', results_to_diff[0], 'your', results_to_diff[1]) - if diff != '': + if not main_crashed and not your_crashed and diff != '': myfile.write(f'libraries:{libraries}\n') myfile.write('diff:\n' + diff + '\n') - with open(timing_file, 'a') as myfile: - myfile.write('{:{package_width}} {:{timing_width}} {:{timing_width}} {:{timing_width}}\n'.format( - package, format_float(time_main), - format_float(time_your), format_float(time_your, time_main), - package_width=package_width, timing_width=timing_width)) + if not main_crashed and not your_crashed: + with open(timing_file, 'a') as myfile: + myfile.write('{:{package_width}} {:{timing_width}} {:{timing_width}} {:{timing_width}}\n'.format( + package, format_float(time_main), + format_float(time_your), format_float(time_your, time_main), + package_width=package_width, timing_width=timing_width)) packages_processed += 1 print(str(packages_processed) + ' of ' + str(args.p) + ' packages processed\n')