llvm-project/llvm
Joe Loser 27731f0475 [llvm][lit] Respect GTEST_TOTAL_SHARDS and GTEST_SHARD_INDEX env vars
There are a variety of issues with using GTest sharding by default for users of
`lit` using the Google Test formatter as mentioned in
https://github.com/llvm/llvm-project/issues/56492 and
https://github.com/llvm/llvm-project/issues/56491.

Currently, there is no way for users to explicitly control the sharding
behavior, even with the environment variables that GTest provides. This patch
teaches the `googletest` formatter to actually respect `GTEST_TOTAL_SHARDS`
and `GTEST_SHARD_INDEX` environment variables if they are set.

In practice, we could go one step further and not do any of the post-processing
of the JSON files if `GTEST_TOTAL_SHARDS` is `1` for example, but that it left
as a follow-up if desired.  There may be preferred alternative approaches to
disabling sharding entirely through another mechanism, such as a lit config
variable.

Differential Revision: https://reviews.llvm.org/D133542
2022-09-09 17:47:21 -06:00
..
benchmarks
bindings [ConstantExpr] Remove fneg expression 2022-09-08 10:24:55 +02:00
cmake tweak zstd behavior in cmake and llvm config for better testing 2022-09-01 07:49:43 -07:00
docs Fix LLVM sphinx build 2022-09-09 07:55:12 -04:00
examples [llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 11:24:15 -07:00
include [llvm] Remove includes of `llvm/Support/STLArrayExtras.h` 2022-09-09 17:44:00 -06:00
lib [llvm] Remove includes of `llvm/Support/STLArrayExtras.h` 2022-09-09 17:44:00 -06:00
projects
resources
runtimes Revert "[runtimes] Use a response file for runtimes test suites" 2022-08-29 11:25:29 -07:00
test OpenMP: mark allocptr attribute on __kmpc_free_shared 2022-09-09 14:09:18 -04:00
tools Speculative bot fix after 4d50a392 2022-09-09 11:19:02 -07:00
unittests [AST] Fix unit test to use BatchAA (NFC) 2022-09-09 16:07:04 +02:00
utils [llvm][lit] Respect GTEST_TOTAL_SHARDS and GTEST_SHARD_INDEX env vars 2022-09-09 17:47:21 -06:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt use LLVM_USE_STATIC_ZSTD 2022-09-02 21:00:38 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.