Skip to content

Commit d388b15

Browse files
committed
[llvm][lit] fix writing results to file
1 parent 3c71f71 commit d388b15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/utils/lit/lit/reports.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ def _write_results_to_file(self, tests, elapsed, file):
286286

287287
json_data = {"traceEvents": events}
288288

289-
json.dump(json_data, time_trace_file, indent=2, sort_keys=True)
289+
with open(self.output_file, "w") as time_trace_file:
290+
json.dump(json_data, time_trace_file, indent=2, sort_keys=True)
290291

291292
def _get_test_event(self, test, first_start_time):
292293
test_name = test.getFullName()

0 commit comments

Comments
 (0)