[llvm] [llvm][llvm-lit] Add option to create unique result file names if results already exist (PR #112729)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 01:13:46 PDT 2024


================
@@ -14,11 +16,43 @@ def by_suite_and_test_path(test):
     return (test.suite.name, id(test.suite), test.path_in_suite)
 
 
-class JsonReport(object):
+class Report(object):
     def __init__(self, output_file):
         self.output_file = output_file
+        # Set by the option parser later.
+        self.use_unique_output_file_name = False
 
     def write_results(self, tests, elapsed):
+        if self.use_unique_output_file_name:
+            file = None
----------------
jh7370 wrote:

Nit: I'd avoid using `file` as a variable name, since it's the name of a built-in function.

https://github.com/llvm/llvm-project/pull/112729


More information about the llvm-commits mailing list