Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unittest] Allow LLVM unit test to run under a wrapper program. #66821

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

zeroomega
Copy link
Contributor

This patch add CMake option "LLVM_GTEST_RUN_UNDER" to LLVM unittest configuration. When specified, LLVM unittest will be run under the wrapper program specified by this option. This feature can simplify the setup to run LLVM unittest on a target platform that is different than host.

This patch add CMake option "LLVM_GTEST_RUN_UNDER" to LLVM unittest
configuration. When specified, LLVM unittest will be run under the
wrapper program specified by this option. This feature can simplify
the setup to run LLVM unittest on a target platform that is different
than host.
@zeroomega
Copy link
Contributor Author

I am a bit hesitated if I should use LLVM_GTEST_RUN_UNDER to eventually allow all gtest based unit test can be redirected to a wrapper program or treat each component individually to just use "LLVM_GTEST_UNITTEST_RUN_UNDER" for this patch. We can add "LLVM_GTEST_CLANG_TEST_RUN_UNDER" later for clang and "LLVM_GTEST_CLANG_TOOLS_TEST_RUN_UNDER" for clang-tools.

In the use case we have, we want to run googletest based unittest on a cross compiled target platform. In this case, all gtest based unittest should be invoked under the wrapper program, so a global LLVM_GTEST_RUN_UNDER options make more sense.

Set "LLVM_GTEST_RUN_UNDER" as a cached value in "llvm/CMakeLists.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants