[llvm] r357369 - gn build: Add build files for most clang-tools-extra unit tests
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 31 09:49:54 PDT 2019
Author: nico
Date: Sun Mar 31 09:49:54 2019
New Revision: 357369
URL: http://llvm.org/viewvc/llvm-project?rev=357369&view=rev
Log:
gn build: Add build files for most clang-tools-extra unit tests
Differential Revision: https://reviews.llvm.org/D60038
Added:
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-change-namespace/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-change-namespace/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-move/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-move/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-query/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-query/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clangd/
llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn
Modified:
llvm/trunk/utils/gn/build/sync_source_lists_from_cmake.py
llvm/trunk/utils/gn/secondary/clang-tools-extra/clangd/indexer/BUILD.gn
llvm/trunk/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
Modified: llvm/trunk/utils/gn/build/sync_source_lists_from_cmake.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/build/sync_source_lists_from_cmake.py?rev=357369&r1=357368&r2=357369&view=diff
==============================================================================
--- llvm/trunk/utils/gn/build/sync_source_lists_from_cmake.py (original)
+++ llvm/trunk/utils/gn/build/sync_source_lists_from_cmake.py Sun Mar 31 09:49:54 2019
@@ -61,6 +61,7 @@ def sync_unittests():
# Matches e.g. |add_llvm_unittest_with_input_files|.
unittest_re = re.compile(r'^add_\S+_unittest', re.MULTILINE)
+ # FIXME: Add 'clang-tools-extra'.
checked = [ 'clang', 'lld', 'llvm' ]
for c in checked:
for root, _, _ in os.walk(os.path.join(c, 'unittests')):
Modified: llvm/trunk/utils/gn/secondary/clang-tools-extra/clangd/indexer/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/clangd/indexer/BUILD.gn?rev=357369&r1=357368&r2=357369&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/clangd/indexer/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/clangd/indexer/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -10,7 +10,7 @@ executable("clangd-indexer") {
"//clang/lib/Tooling",
"//llvm/lib/Support",
]
- include_dirs = [ "..", ]
+ include_dirs = [ ".." ]
sources = [
"IndexerMain.cpp",
]
Modified: llvm/trunk/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/test/BUILD.gn?rev=357369&r1=357368&r2=357369&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/test/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/test/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -72,6 +72,7 @@ group("test") {
"//clang-tools-extra/clangd/tool:clangd",
"//clang-tools-extra/modularize",
"//clang-tools-extra/pp-trace",
+ "//clang-tools-extra/unittests",
"//clang/lib/Headers",
"//clang/tools/c-index-test",
"//clang/tools/clang-rename",
@@ -83,7 +84,6 @@ group("test") {
"//llvm/utils/not",
]
- # FIXME: dep on "//clang-tools-extra/unittests" once it exists
# FIXME: dep on dexp once it exist
testonly = true
}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,15 @@
+group("unittests") {
+ deps = [
+ "clang-apply-replacements:ClangApplyReplacementsTests",
+ "clang-change-namespace:ClangChangeNamespaceTests",
+ "clang-doc:ClangDocTests",
+ "clang-include-fixer:ClangIncludeFixerTests",
+ "clang-include-fixer/find-all-symbols:FindAllSymbolsTests",
+ "clang-move:ClangMoveTests",
+ "clang-query:ClangQueryTests",
+ "clang-tidy:ClangTidyTests",
+ "clangd:ClangdTests",
+ ]
+ # FIXME: dep on clangd/xpc:ClangdXpcTests once it exists
+ testonly = true
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-apply-replacements/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,15 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangApplyReplacementsTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-apply-replacements",
+ "//clang/lib/Basic",
+ "//clang/lib/Tooling/Core",
+ "//clang/lib/Tooling/Refactoring",
+ ]
+ include_dirs = [ "//clang-tools-extra/clang-apply-replacements/include" ]
+ sources = [
+ "ApplyReplacementsTest.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-change-namespace/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-change-namespace/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-change-namespace/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-change-namespace/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,27 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangChangeNamespaceTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-change-namespace",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Format",
+ "//clang/lib/Frontend",
+ "//clang/lib/Rewrite",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//clang/lib/Tooling/Core",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [
+ "//clang-tools-extra/clang-change-namespace",
+
+ # We'd like clang/unittests/Tooling/RewriterTestContext.h in the test.
+ "//clang",
+ ]
+ sources = [
+ "ChangeNamespaceTests.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,29 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangDocTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-doc",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Format",
+ "//clang/lib/Frontend",
+ "//clang/lib/Rewrite",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//clang/lib/Tooling/Core",
+ "//llvm/lib/Bitcode/Reader",
+ "//llvm/lib/Bitcode/Writer",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ "//clang-tools-extra/clang-doc" ]
+ sources = [
+ "BitcodeTest.cpp",
+ "ClangDocTest.cpp",
+ "MDGeneratorTest.cpp",
+ "MergeTest.cpp",
+ "SerializeTest.cpp",
+ "YAMLGeneratorTest.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,27 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangIncludeFixerTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-include-fixer",
+ "//clang-tools-extra/clang-include-fixer/find-all-symbols",
+ "//clang/lib/Basic",
+ "//clang/lib/Format",
+ "//clang/lib/Frontend",
+ "//clang/lib/Rewrite",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//clang/lib/Tooling/Core",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [
+ "//clang-tools-extra/clang-include-fixer",
+
+ # We'd like clang/unittests/Tooling/RewriterTestContext.h in the test.
+ "//clang",
+ ]
+ sources = [
+ "FuzzySymbolIndexTests.cpp",
+ "IncludeFixerTest.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-include-fixer/find-all-symbols/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,20 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("FindAllSymbolsTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-include-fixer/find-all-symbols",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Frontend",
+ "//clang/lib/Lex",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ "//clang-tools-extra/clang-include-fixer/find-all-symbols" ]
+ sources = [
+ "FindAllSymbolsTests.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-move/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-move/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-move/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-move/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,27 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangMoveTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-move",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Format",
+ "//clang/lib/Frontend",
+ "//clang/lib/Rewrite",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//clang/lib/Tooling/Core",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [
+ "//clang-tools-extra/clang-move",
+
+ # We'd like clang/unittests/Tooling/RewriterTestContext.h in the test.
+ "//clang",
+ ]
+ sources = [
+ "ClangMoveTests.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-query/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-query/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-query/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-query/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,21 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangQueryTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-query",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/ASTMatchers/Dynamic",
+ "//clang/lib/Basic",
+ "//clang/lib/Frontend",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ "//clang-tools-extra/clang-query" ]
+ sources = [
+ "QueryEngineTest.cpp",
+ "QueryParserTest.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,36 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangTidyTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-tidy",
+ "//clang-tools-extra/clang-tidy/android",
+ "//clang-tools-extra/clang-tidy/google",
+ "//clang-tools-extra/clang-tidy/llvm",
+ "//clang-tools-extra/clang-tidy/objc",
+ "//clang-tools-extra/clang-tidy/readability",
+ "//clang-tools-extra/clang-tidy/utils",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Frontend",
+ "//clang/lib/Lex",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//clang/lib/Tooling/Core",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ "//clang-tools-extra/clang-tidy" ]
+ sources = [
+ "ClangTidyDiagnosticConsumerTest.cpp",
+ "ClangTidyOptionsTest.cpp",
+ "GoogleModuleTest.cpp",
+ "IncludeInserterTest.cpp",
+ "LLVMModuleTest.cpp",
+ "NamespaceAliaserTest.cpp",
+ "ObjCModuleTest.cpp",
+ "OverlappingReplacementsTest.cpp",
+ "ReadabilityModuleTest.cpp",
+ "UsingInserterTest.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn?rev=357369&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/clang-tools-extra/unittests/clangd/BUILD.gn Sun Mar 31 09:49:54 2019
@@ -0,0 +1,67 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ClangdTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-tidy",
+ "//clang-tools-extra/clangd",
+ "//clang-tools-extra/clangd/refactor/tweaks",
+ "//clang/lib/AST",
+ "//clang/lib/Basic",
+ "//clang/lib/Format",
+ "//clang/lib/Frontend",
+ "//clang/lib/Index",
+ "//clang/lib/Lex",
+ "//clang/lib/Sema",
+ "//clang/lib/Serialization",
+ "//clang/lib/Tooling",
+ "//clang/lib/Tooling/Core",
+ "//clang/lib/Tooling/Inclusions",
+ "//llvm/lib/Support",
+ "//llvm/lib/Testing/Support",
+ ]
+ include_dirs = [ "//clang-tools-extra/clangd" ]
+ sources = [
+ "Annotations.cpp",
+ "BackgroundIndexTests.cpp",
+ "CancellationTests.cpp",
+ "ClangdTests.cpp",
+ "ClangdUnitTests.cpp",
+ "CodeCompleteTests.cpp",
+ "CodeCompletionStringsTests.cpp",
+ "ContextTests.cpp",
+ "DexTests.cpp",
+ "DiagnosticsTests.cpp",
+ "DraftStoreTests.cpp",
+ "ExpectedTypeTest.cpp",
+ "FSTests.cpp",
+ "FileDistanceTests.cpp",
+ "FileIndexTests.cpp",
+ "FindSymbolsTests.cpp",
+ "FunctionTests.cpp",
+ "FuzzyMatchTests.cpp",
+ "GlobalCompilationDatabaseTests.cpp",
+ "HeadersTests.cpp",
+ "IndexActionTests.cpp",
+ "IndexTests.cpp",
+ "JSONTransportTests.cpp",
+ "QualityTests.cpp",
+ "RIFFTests.cpp",
+ "SelectionTests.cpp",
+ "SerializationTests.cpp",
+ "SourceCodeTests.cpp",
+ "SymbolCollectorTests.cpp",
+ "SymbolInfoTests.cpp",
+ "SyncAPI.cpp",
+ "TUSchedulerTests.cpp",
+ "TestFS.cpp",
+ "TestIndex.cpp",
+ "TestTU.cpp",
+ "ThreadingTests.cpp",
+ "TraceTests.cpp",
+ "TweakTests.cpp",
+ "TypeHierarchyTests.cpp",
+ "URITests.cpp",
+ "XRefsTests.cpp",
+ ]
+}
More information about the llvm-commits
mailing list