Skip to content

Commit 6b160cc

Browse files
Make sure we clean up the result path on failure
1 parent 24f338c commit 6b160cc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/benchmark_suite.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def run(ruby:, ruby_description:)
5555
bench_data[entry.name] = process_benchmark_result(result_json_path, result[:command], delete_file: !caller_json_path)
5656
else
5757
bench_failures[entry.name] = result[:status].exitstatus
58+
FileUtils.rm_f(result_json_path) unless caller_json_path
5859
end
5960
end
6061

test/benchmark_suite_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
describe BenchmarkSuite do
1010
before do
11+
ENV.delete('RESULT_JSON_PATH')
1112
@original_dir = Dir.pwd
1213
@temp_dir = Dir.mktmpdir
1314
Dir.chdir(@temp_dir)

0 commit comments

Comments
 (0)