[all-commits] [llvm/llvm-project] a87ba5: [lit] Use sharding for GoogleTest format

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Sun Apr 3 19:47:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a87ba5c86d5d72defdbcdb278baad6515ec99463
      https://github.com/llvm/llvm-project/commit/a87ba5c86d5d72defdbcdb278baad6515ec99463
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2022-04-03 (Sun, 03 Apr 2022)

  Changed paths:
    M llvm/unittests/Support/CrashRecoveryTest.cpp
    M llvm/unittests/Support/ProgramTest.cpp
    M llvm/utils/lit/lit/Test.py
    M llvm/utils/lit/lit/TestingConfig.py
    M llvm/utils/lit/lit/formats/googletest.py
    M llvm/utils/lit/lit/main.py
    A llvm/utils/lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py
    A llvm/utils/lit/tests/Inputs/googletest-crash/lit.cfg
    M llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py
    R llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py
    R llvm/utils/lit/tests/Inputs/googletest-upstream-format/lit.cfg
    A llvm/utils/lit/tests/googletest-crash.py
    M llvm/utils/lit/tests/googletest-format.py
    R llvm/utils/lit/tests/googletest-upstream-format.py

  Log Message:
  -----------
  [lit] Use sharding for GoogleTest format

This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).

The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.

On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.

Reviewed By: yln, rnk

Differential Revision: https://reviews.llvm.org/D122251




More information about the All-commits mailing list