Configure remaining tests in bazel (#879)

master
gaschler 2018-02-01 21:58:59 +01:00 committed by Wally B. Feed
parent eed51b8bb6
commit 9eaf960936
2 changed files with 3 additions and 16 deletions

View File

@ -42,7 +42,7 @@ cc_fix_config(
cmake = True,
files = {"common/config.h.cmake": "common/config.h"},
values = {
"CARTOGRAPHER_CONFIGURATION_FILES_DIRECTORY": "todo_set_config_dir_in_cartographer.BUILD",
"CARTOGRAPHER_CONFIGURATION_FILES_DIRECTORY": "configuration_files",
"PROJECT_SOURCE_DIR": "todo_set_project_source_dir_in_cartographer.BUILD",
},
visibility = ["//visibility:private"],
@ -77,21 +77,14 @@ cc_library(
],
)
# TODO(rodrigoq): these tests need to read the configuration files, but they're
# not able to find them.
EXCLUDED_TESTS = [
"common/configuration_files_test.cc",
"mapping/map_builder_test.cc",
]
[cc_test(
name = src.replace("/", "_").replace(".cc", ""),
srcs = [src],
data = ["//:configuration_files"],
deps = [
":cartographer",
"@com_google_googletest//:gtest_main",
],
) for src in glob(
["**/*_test.cc"],
exclude = EXCLUDED_TESTS,
)]

View File

@ -103,12 +103,6 @@ cc_binary(
],
)
# TODO(rodrigoq): these tests need to read the configuration files, but they're
# not able to find them.
EXCLUDED_TESTS = [
"client_server_test.cc",
]
# This service is only used by the tests.
cc_grpc_library(
name = "framework_proto_math_service_grpc_cc",
@ -125,6 +119,7 @@ cc_grpc_library(
[cc_test(
name = src.replace("/", "_").replace(".cc", ""),
srcs = [src],
data = ["//:configuration_files"],
deps = [
":cartographer_grpc",
":framework_proto_math_service_grpc_cc",
@ -132,5 +127,4 @@ cc_grpc_library(
],
) for src in glob(
["**/*_test.cc"],
exclude = EXCLUDED_TESTS,
)]