Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lit] - need an option to rename or disable .lit_test_times.txt #59265

Closed
MaximPavlenko opened this issue Nov 30, 2022 · 2 comments
Closed

[lit] - need an option to rename or disable .lit_test_times.txt #59265

MaximPavlenko opened this issue Nov 30, 2022 · 2 comments
Labels

Comments

@MaximPavlenko
Copy link

MaximPavlenko commented Nov 30, 2022

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)
@MaximPavlenko MaximPavlenko changed the title lit - .lit_test_times.txt [lit] - need an option to rename or disable .lit_test_times.txt Nov 30, 2022
@yuanfang-chen
Copy link
Collaborator

Or probably just attach a pid to the file name.

@dtcxzyw dtcxzyw added llvm-lit and removed new issue labels Oct 1, 2023
@MaximPavlenko
Copy link
Author

MaximPavlenko commented Mar 27, 2025

The issue was fixed in LLVM19 (867ff2d).
--skip-test-time-recording option was added.
Issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants