Skip to content

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

Closed
@MaximPavlenko

Description

@MaximPavlenko

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions