From 3c3d77158fceaf54c55e00f7eca50b2c2194ee87 Mon Sep 17 00:00:00 2001 From: Eric Salo Date: Tue, 26 Dec 2023 14:10:05 -0800 Subject: [PATCH] upb: add :test_srcs targets for cmake on GH PiperOrigin-RevId: 593854176 --- upb/hash/BUILD | 12 ++++++++++++ upb/json/BUILD | 21 +++++++++++++++++++++ upb/lex/BUILD | 12 ++++++++++++ upb/mem/BUILD | 12 ++++++++++++ upb/message/BUILD | 21 +++++++++++++++++++++ upb/mini_descriptor/BUILD | 12 ++++++++++++ upb/mini_table/BUILD | 12 ++++++++++++ upb/test/BUILD | 22 ++++++++++++++++++++++ upb/util/BUILD | 21 +++++++++++++++++++++ upb/wire/BUILD | 12 ++++++++++++ 10 files changed, 157 insertions(+) diff --git a/upb/hash/BUILD b/upb/hash/BUILD index 4c18e0cc4d..c7e4ea6b42 100644 --- a/upb/hash/BUILD +++ b/upb/hash/BUILD @@ -54,3 +54,15 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/json/BUILD b/upb/json/BUILD index 91c7dc1658..b04c4fdb32 100644 --- a/upb/json/BUILD +++ b/upb/json/BUILD @@ -107,3 +107,24 @@ upb_c_proto_library( # ], # ) # end:google_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +filegroup( + name = "test_utils", + srcs = glob( + [ + "**/*test.proto", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/lex/BUILD b/upb/lex/BUILD index 664074b85f..2dbf258e74 100644 --- a/upb/lex/BUILD +++ b/upb/lex/BUILD @@ -51,3 +51,15 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/mem/BUILD b/upb/mem/BUILD index 14e6e6aeea..a26b92eca5 100644 --- a/upb/mem/BUILD +++ b/upb/mem/BUILD @@ -68,3 +68,15 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/message/BUILD b/upb/message/BUILD index 98facaa8a7..6a2660ace9 100644 --- a/upb/message/BUILD +++ b/upb/message/BUILD @@ -423,3 +423,24 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +filegroup( + name = "test_utils", + srcs = glob( + [ + "**/*test.proto", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/mini_descriptor/BUILD b/upb/mini_descriptor/BUILD index f8292601dd..9ea571e6bb 100644 --- a/upb/mini_descriptor/BUILD +++ b/upb/mini_descriptor/BUILD @@ -85,3 +85,15 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/mini_table/BUILD b/upb/mini_table/BUILD index 457f657d45..4c73d1c39a 100644 --- a/upb/mini_table/BUILD +++ b/upb/mini_table/BUILD @@ -90,3 +90,15 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/test/BUILD b/upb/test/BUILD index a447a82cc0..186dacd37c 100644 --- a/upb/test/BUILD +++ b/upb/test/BUILD @@ -299,3 +299,25 @@ cc_test( "@com_google_googletest//:gtest_main", ], ) + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*.cc", + "**/*.h", + ], + ), + visibility = ["//pkg:__pkg__"], +) +filegroup( + name = "test_utils", + srcs = glob( + [ + "**/*.proto", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/util/BUILD b/upb/util/BUILD index f4c9803b4a..e299780ec5 100644 --- a/upb/util/BUILD +++ b/upb/util/BUILD @@ -182,3 +182,24 @@ filegroup( visibility = ["//python/dist:__pkg__"], ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +filegroup( + name = "test_utils", + srcs = glob( + [ + "**/*test.proto", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only diff --git a/upb/wire/BUILD b/upb/wire/BUILD index 3ef01192f8..e415a1894d 100644 --- a/upb/wire/BUILD +++ b/upb/wire/BUILD @@ -96,3 +96,15 @@ filegroup( ] ) # end:github_only + +# begin:github_only +filegroup( + name = "test_srcs", + srcs = glob( + [ + "**/*test.cc", + ], + ), + visibility = ["//pkg:__pkg__"], +) +# end:github_only