<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59265>59265</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lit - .lit_test_times.txt
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MaximPavlenko
</td>
</tr>
</table>
<pre>
Hi All,
Latest LIT always produces ".lit_test_times.txt" file. However there is no opportunity to rename it or disable its generation.
This means that when you run several instances of LIT in the same folder of tests, then .lit_test_times.txt can be corrupted. And when it is corrupted, then LIT exits with an error.
Why somebody need to run several instances of LIT?
For example we use farm with lots of machines and each "executor" can run only one thread. So we have to run hundreds of LIT instances to speed up tests execution.
How to fix:
- An option can be added that will allow to rename this file.
Something like "--lit-test-times-output=FILE_NAME"
- Add an option that can disable generation of this file.
- Generate/read .lit_test_times.txt only when --order=smart. Orders "lexical" and "random" do not use info from this file.
This is how I did it locally.
```
llvm-project/llvm/utils/lit/lit/main.py
- record_test_times(selected_tests, lit_config)
+ from lit.cl_arguments import TestOrder
+ enum_order = TestOrder(opts.order)
+ if enum_order == TestOrder.SMART:
+ record_test_times(selected_tests, lit_config)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVE1v4zYQ_TXSZWBBlm3FPujgbda7AZJt0Q3Qo0GLI4tdihRIKrb_fWcoy-tsg14aCFJIzseb9x59sPJSfVWw1TopfkvyxyTfPouAPsDz0ysIfRIXD72zcqjRQ1IUmVZhzwH7oDr0WTgH2oVGaczgqz3hGzoILToE5cFYsH1vXRiMChcIFhwa0dFZAOtAKi8OmlcejmjQiaCsyWAE8tpShQ6F8VRQBDi1aOBiB3CDAc-NhAZlfBCGwdkmYlaG24PnLo3VkuDQCSP2NCKfGfhgCKiFgQNCbZ0b-oAyg62RY08CS0huJ7cy3A7PDP6kQgtUAJ2zLhvhj--_2gt42-GBmAaDKCMJ_zF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