[llvm] [unittest] Add option to allow disabling sharding in unittest (PR #67063)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 15:49:42 PDT 2023


================
@@ -19,7 +19,12 @@
 config.test_source_root = config.test_exec_root
 
 # testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests")
+config.test_format = lit.formats.GoogleTest(
----------------
zeroomega wrote:

The motivation behind the 2 patches is we would like to extend LLVM support for a Fuchsia platform and be able to use LLVM library natively on Fuchsia. As a first step, we need to make sure LLVM test (starting from the LLVM unittest) can run successfully on Fuchsia. And it can only be achieved by cross compile LLVM on a supported host like Linux but run the test remotely on Fuchsia through a wrapper that bring a tunnel between the host and testing target platform. Sharding is causing significant time overhead in this use case, so as the first step, I add the option to allow LLVM unitest sharding to be disabled. The option's name is also `-DLLVM_GTEST_USE_SHARDING` so it only apply to LLVM's gtest based unit test. If other individual component like compiler-rt needs the same feature, IMO should be using `-DRUNTIME_GTEST_USE_SHARDING`

But I get your point, if you think a global setting to disable sharding on gtest is needed, maybe we should consider  a LIT's configuration and make it configurable through `-DLLVM_LIT_ARGS=` so we don't have to individually modify each test configuration. Please let me know your comment on this. 



https://github.com/llvm/llvm-project/pull/67063


More information about the llvm-commits mailing list