Skip to content

Commit

Permalink
Bazel: Uniform gtest package name to com_google_googletest.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxq committed Jan 14, 2020
1 parent ff05d2c commit 062fe77
Show file tree
Hide file tree
Showing 207 changed files with 625 additions and 613 deletions.
14 changes: 13 additions & 1 deletion WORKSPACE.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ workspace(name = "apollo")

# googletest (GTest and GMock)
new_http_archive(
name = "gtest",
name = "com_google_googletest",
build_file = "third_party/gtest.BUILD",
sha256 = "58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8",
strip_prefix = "googletest-release-1.8.0",
url = "file:///home/tmp/googletest-release-1.8.0.tar.gz",
)

# TODO(xiaoxq): Alias to help migrate legacy code in other repos. Will remove
# very soon.
new_local_repository(
name = "gtest",
path = "/home/tmp",
build_file_content = """
package(default_visibility = ["//visibility:public"])
cc_library(name = "gtest", deps = ["@com_google_googletest//:gtest"])
cc_library(name = "main", deps = ["@com_google_googletest//:gtest_main"])
""",
)

# gflags
new_local_repository(
name = "com_github_gflags_gflags",
Expand Down
14 changes: 7 additions & 7 deletions cyber/base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cc_test(
srcs = ["atomic_hash_map_test.cc"],
deps = [
"//cyber/base:atomic_hash_map",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -52,7 +52,7 @@ cc_test(
deps = [
"//cyber/base:atomic_rw_lock",
"//cyber/base:reentrant_rw_lock",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -71,7 +71,7 @@ cc_test(
srcs = ["bounded_queue_test.cc"],
deps = [
"//cyber/base:bounded_queue",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -97,7 +97,7 @@ cc_test(
srcs = ["for_each_test.cc"],
deps = [
"//cyber/base:for_each",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down Expand Up @@ -125,7 +125,7 @@ cc_test(
deps = [
"//cyber/base:concurrent_object_pool",
"//cyber/base:object_pool",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -150,7 +150,7 @@ cc_test(
srcs = ["signal_test.cc"],
deps = [
"//cyber/base:signal",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -175,7 +175,7 @@ cc_test(
srcs = ["unbounded_queue_test.cc"],
deps = [
"//cyber/base:unbounded_queue",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
4 changes: 2 additions & 2 deletions cyber/blocker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -34,7 +34,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
2 changes: 1 addition & 1 deletion cyber/class_loader/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cc_test(
"//cyber",
"//cyber/class_loader/test:base",
"//cyber/proto:unit_test_cc_proto",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand Down
6 changes: 3 additions & 3 deletions cyber/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -52,7 +52,7 @@ cc_test(
srcs = ["log_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down Expand Up @@ -82,7 +82,7 @@ cc_test(
srcs = ["macros_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
4 changes: 2 additions & 2 deletions cyber/component/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cc_test(
srcs = ["component_test.cc"],
deps = [
"//cyber",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand All @@ -43,7 +43,7 @@ cc_test(
srcs = ["timer_component_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
2 changes: 1 addition & 1 deletion cyber/croutine/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ cc_test(
srcs = ["croutine_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
10 changes: 5 additions & 5 deletions cyber/data/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cc_test(
srcs = ["cache_buffer_test.cc"],
deps = [
":cache_buffer",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down Expand Up @@ -59,7 +59,7 @@ cc_test(
srcs = ["data_visitor_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -82,7 +82,7 @@ cc_test(
srcs = ["data_dispatcher_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -92,7 +92,7 @@ cc_test(
srcs = ["channel_buffer_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -116,7 +116,7 @@ cc_test(
srcs = ["fusion/all_latest_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
2 changes: 1 addition & 1 deletion cyber/io/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cc_test(
deps = [
":poller",
"//cyber:cyber_core",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand Down
8 changes: 4 additions & 4 deletions cyber/logger/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cc_test(
srcs = ["logger_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -39,7 +39,7 @@ cc_test(
srcs = ["async_logger_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -60,7 +60,7 @@ cc_test(
srcs = ["log_file_object_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -79,7 +79,7 @@ cc_test(
srcs = ["logger_util_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
8 changes: 4 additions & 4 deletions cyber/message/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cc_test(
srcs = ["message_header_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -36,7 +36,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down Expand Up @@ -90,7 +90,7 @@ cc_test(
srcs = ["raw_message_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -101,7 +101,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
10 changes: 5 additions & 5 deletions cyber/node/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -57,7 +57,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down Expand Up @@ -94,7 +94,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand Down Expand Up @@ -127,7 +127,7 @@ cc_test(
deps = [
"//cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand All @@ -139,7 +139,7 @@ cc_test(
"//cyber",
"//cyber/node:writer_base",
"//cyber/proto:unit_test_cc_proto",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand Down
6 changes: 3 additions & 3 deletions cyber/parameter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cc_test(
srcs = ["parameter_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -40,7 +40,7 @@ cc_test(
srcs = ["parameter_client_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand All @@ -63,7 +63,7 @@ cc_test(
srcs = ["parameter_server_test.cc"],
deps = [
"//cyber",
"@gtest//:main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
4 changes: 2 additions & 2 deletions cyber/py_wrapper/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cc_test(
deps = [
":py3_cyber",
"//cyber/proto:unit_test_cc_proto",
"@gtest",
"@com_google_googletest//:gtest",
],
)

Expand Down Expand Up @@ -97,8 +97,8 @@ cc_test(
":py3_record",
"//cyber:cyber_core",
"//cyber/proto:unit_test_cc_proto",
"@com_google_googletest//:gtest_main",
"@fastrtps",
"@gtest//:main",
],
)

Expand Down
Loading

0 comments on commit 062fe77

Please sign in to comment.