mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Split test targets that can run on windows.
PiperOrigin-RevId: 658619600
This commit is contained in:
committed by
Copybara-Service
parent
6deec6a735
commit
f2d591e045
+67
-22
@@ -430,36 +430,17 @@ cc_library(
|
|||||||
)
|
)
|
||||||
|
|
||||||
cc_test(
|
cc_test(
|
||||||
name = "public_test",
|
name = "public_device_test",
|
||||||
size = "small",
|
size = "small",
|
||||||
timeout = "moderate",
|
timeout = "moderate",
|
||||||
srcs = [
|
srcs = [
|
||||||
"atomic_boolean_test.cc",
|
|
||||||
"atomic_reference_test.cc",
|
|
||||||
"ble_connection_info_test.cc",
|
"ble_connection_info_test.cc",
|
||||||
"ble_test.cc",
|
"ble_test.cc",
|
||||||
"ble_v2_test.cc",
|
"ble_v2_test.cc",
|
||||||
"bluetooth_adapter_test.cc",
|
"bluetooth_adapter_test.cc",
|
||||||
"bluetooth_classic_test.cc",
|
"bluetooth_classic_test.cc",
|
||||||
"bluetooth_connection_info_test.cc",
|
"bluetooth_connection_info_test.cc",
|
||||||
"borrowable_test.cc",
|
|
||||||
"cancelable_alarm_test.cc",
|
|
||||||
"condition_variable_test.cc",
|
|
||||||
"connection_info_test.cc",
|
|
||||||
"count_down_latch_test.cc",
|
|
||||||
"credential_storage_impl_test.cc",
|
|
||||||
"crypto_test.cc",
|
|
||||||
"direct_executor_test.cc",
|
|
||||||
"future_test.cc",
|
|
||||||
"logging_test.cc",
|
|
||||||
"multi_thread_executor_test.cc",
|
|
||||||
"mutex_test.cc",
|
|
||||||
"pipe_test.cc",
|
"pipe_test.cc",
|
||||||
"scheduled_executor_test.cc",
|
|
||||||
"single_thread_executor_test.cc",
|
|
||||||
"task_runner_impl_test.cc",
|
|
||||||
"timer_impl_test.cc",
|
|
||||||
"uuid_test.cc",
|
|
||||||
"wifi_direct_test.cc",
|
"wifi_direct_test.cc",
|
||||||
"wifi_hotspot_test.cc",
|
"wifi_hotspot_test.cc",
|
||||||
"wifi_lan_connection_info_test.cc",
|
"wifi_lan_connection_info_test.cc",
|
||||||
@@ -467,6 +448,64 @@ cc_test(
|
|||||||
"wifi_test.cc",
|
"wifi_test.cc",
|
||||||
"wifi_utils_test.cc",
|
"wifi_utils_test.cc",
|
||||||
],
|
],
|
||||||
|
deps = [
|
||||||
|
":base",
|
||||||
|
":cancellation_flag",
|
||||||
|
":comm",
|
||||||
|
":connection_info",
|
||||||
|
":test_util",
|
||||||
|
":types",
|
||||||
|
"//internal/platform/implementation:comm",
|
||||||
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
||||||
|
"//proto:connections_enums_cc_proto",
|
||||||
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
||||||
|
"@com_google_absl//absl/status",
|
||||||
|
"@com_google_absl//absl/strings",
|
||||||
|
"@com_google_absl//absl/time",
|
||||||
|
"@com_google_googletest//:gtest_main",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_test(
|
||||||
|
name = "credential_storage_impl_test",
|
||||||
|
srcs = ["credential_storage_impl_test.cc"],
|
||||||
|
deps = [
|
||||||
|
":comm",
|
||||||
|
"//internal/platform/implementation:comm",
|
||||||
|
"//internal/platform/implementation/g3", # build_cleaner: keep
|
||||||
|
"//internal/proto:credential_cc_proto",
|
||||||
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
||||||
|
"@com_google_absl//absl/status",
|
||||||
|
"@com_google_absl//absl/status:statusor",
|
||||||
|
"@com_google_absl//absl/strings:string_view",
|
||||||
|
"@com_google_googletest//:gtest_main",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_test(
|
||||||
|
name = "public_test",
|
||||||
|
size = "small",
|
||||||
|
timeout = "moderate",
|
||||||
|
srcs = [
|
||||||
|
"atomic_boolean_test.cc",
|
||||||
|
"atomic_reference_test.cc",
|
||||||
|
"borrowable_test.cc",
|
||||||
|
"cancelable_alarm_test.cc",
|
||||||
|
"condition_variable_test.cc",
|
||||||
|
"connection_info_test.cc",
|
||||||
|
"count_down_latch_test.cc",
|
||||||
|
"crypto_test.cc",
|
||||||
|
"direct_executor_test.cc",
|
||||||
|
"future_test.cc",
|
||||||
|
"logging_test.cc",
|
||||||
|
"multi_thread_executor_test.cc",
|
||||||
|
"mutex_test.cc",
|
||||||
|
"scheduled_executor_test.cc",
|
||||||
|
"single_thread_executor_test.cc",
|
||||||
|
"task_runner_impl_test.cc",
|
||||||
|
"timer_impl_test.cc",
|
||||||
|
"uuid_test.cc",
|
||||||
|
],
|
||||||
copts = ["-DCORE_ADAPTER_DLL"],
|
copts = ["-DCORE_ADAPTER_DLL"],
|
||||||
shard_count = 16,
|
shard_count = 16,
|
||||||
deps = [
|
deps = [
|
||||||
@@ -479,7 +518,6 @@ cc_test(
|
|||||||
":uuid",
|
":uuid",
|
||||||
"//internal/crypto_cros",
|
"//internal/crypto_cros",
|
||||||
"//internal/platform/implementation:comm",
|
"//internal/platform/implementation:comm",
|
||||||
"//internal/platform/implementation/g3", # build_cleaner: keep
|
|
||||||
"//internal/proto:credential_cc_proto",
|
"//internal/proto:credential_cc_proto",
|
||||||
"//proto:connections_enums_cc_proto",
|
"//proto:connections_enums_cc_proto",
|
||||||
"@com_github_protobuf_matchers//protobuf-matchers",
|
"@com_github_protobuf_matchers//protobuf-matchers",
|
||||||
@@ -490,5 +528,12 @@ cc_test(
|
|||||||
"@com_google_absl//absl/time",
|
"@com_google_absl//absl/time",
|
||||||
"@com_google_absl//absl/types:variant",
|
"@com_google_absl//absl/types:variant",
|
||||||
"@com_google_googletest//:gtest_main",
|
"@com_google_googletest//:gtest_main",
|
||||||
],
|
] + select({
|
||||||
|
"@platforms//os:windows": [
|
||||||
|
"//internal/platform/implementation/windows",
|
||||||
|
],
|
||||||
|
"//conditions:default": [
|
||||||
|
"//internal/platform/implementation/g3",
|
||||||
|
],
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ cc_library(
|
|||||||
"//chrome/chromeos/assistant/data_migration/lib:__pkg__",
|
"//chrome/chromeos/assistant/data_migration/lib:__pkg__",
|
||||||
"//connections:__subpackages__",
|
"//connections:__subpackages__",
|
||||||
"//fastpair:__subpackages__",
|
"//fastpair:__subpackages__",
|
||||||
|
"//internal/platform:__subpackages__",
|
||||||
"//location/nearby:__subpackages__",
|
"//location/nearby:__subpackages__",
|
||||||
"//presence:__subpackages__",
|
"//presence:__subpackages__",
|
||||||
"//sharing:__subpackages__",
|
"//sharing:__subpackages__",
|
||||||
|
|||||||
@@ -27,14 +27,13 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <fstream>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "absl/status/statusor.h"
|
#include "absl/status/statusor.h"
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
|
#include "internal/platform/implementation/credential_storage.h"
|
||||||
#include "internal/platform/implementation/http_loader.h"
|
#include "internal/platform/implementation/http_loader.h"
|
||||||
#include "internal/platform/implementation/shared/count_down_latch.h"
|
#include "internal/platform/implementation/shared/count_down_latch.h"
|
||||||
#include "internal/platform/implementation/windows/atomic_boolean.h"
|
#include "internal/platform/implementation/windows/atomic_boolean.h"
|
||||||
@@ -276,6 +275,11 @@ ImplementationPlatform::CreateBleV2Medium(api::BluetoothAdapter& adapter) {
|
|||||||
return std::make_unique<windows::BleV2Medium>(adapter);
|
return std::make_unique<windows::BleV2Medium>(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<api::CredentialStorage>
|
||||||
|
ImplementationPlatform::CreateCredentialStorage() {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO(b/184975123): replace with real implementation.
|
// TODO(b/184975123): replace with real implementation.
|
||||||
std::unique_ptr<ServerSyncMedium>
|
std::unique_ptr<ServerSyncMedium>
|
||||||
ImplementationPlatform::CreateServerSyncMedium() {
|
ImplementationPlatform::CreateServerSyncMedium() {
|
||||||
|
|||||||
Reference in New Issue
Block a user