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

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Tue Apr 12 14:51:46 PDT 2022


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

  Changed paths:
    M llvm/unittests/Support/CrashRecoveryTest.cpp
    M llvm/unittests/Support/ProgramTest.cpp
    M llvm/utils/lit/lit/LitConfig.py
    M llvm/utils/lit/lit/LitTestCase.py
    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-cmd-wrapper/DummySubDir/OneTest.exe
    A llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg
    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
    M llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py
    M llvm/utils/lit/tests/Inputs/googletest-timeout/lit.cfg
    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-cmd-wrapper.py
    A llvm/utils/lit/tests/googletest-crash.py
    M llvm/utils/lit/tests/googletest-format.py
    M llvm/utils/lit/tests/googletest-timeout.py
    R llvm/utils/lit/tests/googletest-upstream-format.py
    M llvm/utils/lit/tests/test-output-resultdb.py
    M llvm/utils/lit/tests/unit/TestRunner.py

  Log Message:
  -----------
  [Reland][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, abrachet

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




More information about the All-commits mailing list