-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[clang] Shard out some small gtest binaries #138021
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
Conversation
@nico mentioned that FormatTests and BasicTests are small binaries with few dependencies, so keeping them separate is nice. I broke them out as distinct test binaries, and they are still pretty small: $ find tools/clang/unittests/ -type f -name '*Tests' | xargs du -cksh | sort -nr 708M total 276M tools/clang/unittests/AllClangUnitTests 244M tools/clang/unittests/Interpreter/ClangReplInterpreterTests 167M tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests 13M tools/clang/unittests/Format/FormatTests 6.9M tools/clang/unittests/Basic/BasicTests 1.1M tools/clang/unittests/libclang/CrashTests/libclangCrashTests I also broke out libclangCrashTests and re-enabled the failing test to resolve llvm#137855.
@llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes@nico mentioned that FormatTests and BasicTests are small binaries with $ find tools/clang/unittests/ -type f -name '*Tests' | xargs du -cksh | sort -nr I also broke out libclangCrashTests and re-enabled the failing test to Full diff: https://github.com/llvm/llvm-project/pull/138021.diff 4 Files Affected:
diff --git a/clang/unittests/Basic/CMakeLists.txt b/clang/unittests/Basic/CMakeLists.txt
index e818bd3e2c372..95f3a0fb480cb 100644
--- a/clang/unittests/Basic/CMakeLists.txt
+++ b/clang/unittests/Basic/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_clang_unittest(BasicTests
+add_distinct_clang_unittest(BasicTests
CharInfoTest.cpp
DarwinSDKInfoTest.cpp
DiagnosticTest.cpp
diff --git a/clang/unittests/Format/CMakeLists.txt b/clang/unittests/Format/CMakeLists.txt
index 0af571a65dafa..f44d25b756a58 100644
--- a/clang/unittests/Format/CMakeLists.txt
+++ b/clang/unittests/Format/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_clang_unittest(FormatTests
+add_distinct_clang_unittest(FormatTests
BracesInserterTest.cpp
BracesRemoverTest.cpp
CleanupTest.cpp
diff --git a/clang/unittests/libclang/CrashTests/CMakeLists.txt b/clang/unittests/libclang/CrashTests/CMakeLists.txt
index de7b5a8f6ee91..d8b164e2957b0 100644
--- a/clang/unittests/libclang/CrashTests/CMakeLists.txt
+++ b/clang/unittests/libclang/CrashTests/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_clang_unittest(libclangCrashTests
+add_distinct_clang_unittest(libclangCrashTests
LibclangCrashTest.cpp
LINK_LIBS
libclang
diff --git a/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp b/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp
index be1f26f5ae53e..26c63cfbd427b 100644
--- a/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp
+++ b/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp
@@ -23,8 +23,7 @@ TEST_F(LibclangParseTest, InstallAbortingLLVMFatalErrorHandler) {
"");
}
-// FIXME: Re-enable after Mac-AArch64 signpost crash issues are debugged.
-TEST_F(LibclangParseTest, DISABLED_UninstallAbortingLLVMFatalErrorHandler) {
+TEST_F(LibclangParseTest, UninstallAbortingLLVMFatalErrorHandler) {
clang_toggleCrashRecovery(0);
clang_install_aborting_llvm_fatal_error_handler();
clang_uninstall_llvm_fatal_error_handler();
|
@llvm/pr-subscribers-clang-format Author: Reid Kleckner (rnk) Changes@nico mentioned that FormatTests and BasicTests are small binaries with $ find tools/clang/unittests/ -type f -name '*Tests' | xargs du -cksh | sort -nr I also broke out libclangCrashTests and re-enabled the failing test to Full diff: https://github.com/llvm/llvm-project/pull/138021.diff 4 Files Affected:
diff --git a/clang/unittests/Basic/CMakeLists.txt b/clang/unittests/Basic/CMakeLists.txt
index e818bd3e2c372..95f3a0fb480cb 100644
--- a/clang/unittests/Basic/CMakeLists.txt
+++ b/clang/unittests/Basic/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_clang_unittest(BasicTests
+add_distinct_clang_unittest(BasicTests
CharInfoTest.cpp
DarwinSDKInfoTest.cpp
DiagnosticTest.cpp
diff --git a/clang/unittests/Format/CMakeLists.txt b/clang/unittests/Format/CMakeLists.txt
index 0af571a65dafa..f44d25b756a58 100644
--- a/clang/unittests/Format/CMakeLists.txt
+++ b/clang/unittests/Format/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_clang_unittest(FormatTests
+add_distinct_clang_unittest(FormatTests
BracesInserterTest.cpp
BracesRemoverTest.cpp
CleanupTest.cpp
diff --git a/clang/unittests/libclang/CrashTests/CMakeLists.txt b/clang/unittests/libclang/CrashTests/CMakeLists.txt
index de7b5a8f6ee91..d8b164e2957b0 100644
--- a/clang/unittests/libclang/CrashTests/CMakeLists.txt
+++ b/clang/unittests/libclang/CrashTests/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_clang_unittest(libclangCrashTests
+add_distinct_clang_unittest(libclangCrashTests
LibclangCrashTest.cpp
LINK_LIBS
libclang
diff --git a/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp b/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp
index be1f26f5ae53e..26c63cfbd427b 100644
--- a/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp
+++ b/clang/unittests/libclang/CrashTests/LibclangCrashTest.cpp
@@ -23,8 +23,7 @@ TEST_F(LibclangParseTest, InstallAbortingLLVMFatalErrorHandler) {
"");
}
-// FIXME: Re-enable after Mac-AArch64 signpost crash issues are debugged.
-TEST_F(LibclangParseTest, DISABLED_UninstallAbortingLLVMFatalErrorHandler) {
+TEST_F(LibclangParseTest, UninstallAbortingLLVMFatalErrorHandler) {
clang_toggleCrashRecovery(0);
clang_install_aborting_llvm_fatal_error_handler();
clang_uninstall_llvm_fatal_error_handler();
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, thanks!
Thoughts on #134196 (comment) ? :)
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/4484 Here is the relevant piece of the build log for the reference
|
@nico mentioned that FormatTests and BasicTests are small binaries with
few dependencies, so keeping them separate is nice. I broke them out as
distinct test binaries, and they are still pretty small:
$ find tools/clang/unittests/ -type f -name '*Tests' | xargs du -cksh | sort -nr
708M total
276M tools/clang/unittests/AllClangUnitTests
244M tools/clang/unittests/Interpreter/ClangReplInterpreterTests
167M tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
13M tools/clang/unittests/Format/FormatTests
6.9M tools/clang/unittests/Basic/BasicTests
1.1M tools/clang/unittests/libclang/CrashTests/libclangCrashTests
I also broke out libclangCrashTests and re-enabled the failing test to
resolve #137855.