| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//third_party/protobuf/proto_library.gni") |
| |
| proto_library("cobalt_local_aggregation_proto") { |
| proto_in_dir = "$cobalt_root" |
| sources = [ |
| "local_aggregation.proto", |
| ] |
| import_dirs = [ "//third_party/protobuf/src" ] |
| generate_python = false |
| cc_generator_options = "lite" |
| deps = [ |
| "$cobalt_root/src/registry:cobalt_registry_proto", |
| ] |
| |
| extra_configs = [ |
| "$cobalt_root:cobalt_config", |
| "$cobalt_root/src/registry:proto_config", |
| ] |
| } |
| |
| source_set("aggregation_utils") { |
| sources = [ |
| "aggregation_utils.cc", |
| "aggregation_utils.h", |
| ] |
| |
| public_deps = [ |
| "$cobalt_root/src:logging", |
| "$cobalt_root/src/logger:status", |
| "$cobalt_root/src/registry:cobalt_registry_proto", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("event_aggregator_mgr") { |
| sources = [ |
| "event_aggregator_mgr.cc", |
| "event_aggregator_mgr.h", |
| ] |
| |
| public_configs = [ |
| "$cobalt_root:cobalt_config", |
| "$cobalt_root/src/registry:proto_config", |
| ] |
| |
| public_deps = [ |
| ":event_aggregator", |
| "$cobalt_root/src/lib/util:clock", |
| "$cobalt_root/src/lib/util:consistent_proto_store", |
| "$cobalt_root/src/lib/util:datetime_util", |
| "$cobalt_root/src/lib/util:file_system", |
| "$cobalt_root/src/logger:encoder", |
| "$cobalt_root/src/logger:observation_writer", |
| "$cobalt_root/src/logger:status", |
| "$cobalt_root/src/public:cobalt_config", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("event_aggregator") { |
| sources = [ |
| "event_aggregator.cc", |
| "event_aggregator.h", |
| ] |
| |
| public_configs = [ |
| "$cobalt_root:cobalt_config", |
| "$cobalt_root/src/registry:proto_config", |
| ] |
| |
| public_deps = [ |
| ":aggregate_store", |
| "$cobalt_root/src:logging", |
| "$cobalt_root/src/lib/util:clock", |
| "$cobalt_root/src/lib/util:datetime_util", |
| "$cobalt_root/src/lib/util:proto_util", |
| "$cobalt_root/src/logger:encoder", |
| "$cobalt_root/src/logger:event_record", |
| "$cobalt_root/src/logger:observation_writer", |
| "$cobalt_root/src/logger:status", |
| "$cobalt_root/src/pb", |
| "$cobalt_root/src/registry:packed_event_codes", |
| ] |
| } |
| |
| source_set("aggregate_store") { |
| sources = [ |
| "aggregate_store.cc", |
| "aggregate_store.h", |
| ] |
| |
| public_configs = [ |
| "$cobalt_root:cobalt_config", |
| "$cobalt_root/src/registry:proto_config", |
| ] |
| |
| public_deps = [ |
| ":aggregation_utils", |
| ":cobalt_local_aggregation_proto", |
| "$cobalt_root/src/algorithms/rappor:rappor_encoder", |
| "$cobalt_root/src/lib/util:consistent_proto_store", |
| "$cobalt_root/src/lib/util:datetime_util", |
| "$cobalt_root/src/lib/util:protected_fields", |
| "$cobalt_root/src/lib/util:proto_util", |
| "$cobalt_root/src/logger:encoder", |
| "$cobalt_root/src/logger:observation_writer", |
| "$cobalt_root/src/logger:status", |
| "$cobalt_root/src/pb", |
| "$cobalt_root/src/registry:cobalt_registry_proto", |
| "$cobalt_root/src/registry:packed_event_codes", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("aggregation_utils_test") { |
| testonly = true |
| |
| sources = [ |
| "aggregation_utils_test.cc", |
| ] |
| |
| public_deps = [ |
| ":aggregation_utils", |
| "//third_party/googletest:gtest", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("event_aggregator_test") { |
| testonly = true |
| sources = [ |
| "event_aggregator_test.cc", |
| ] |
| public_deps = [ |
| ":aggregation_utils", |
| ":event_aggregator_mgr", |
| "$cobalt_root/src/logger:logger_test_utils", |
| "$cobalt_root/src/logger:testing_constants", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| source_set("aggregate_store_test") { |
| testonly = true |
| sources = [ |
| "aggregate_store_test.cc", |
| ] |
| public_deps = [ |
| ":aggregate_store", |
| ":aggregation_utils", |
| ":event_aggregator_mgr", |
| "$cobalt_root/src/logger:logger_test_utils", |
| "$cobalt_root/src/logger:testing_constants", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| source_set("event_aggregator_mgr_test") { |
| testonly = true |
| sources = [ |
| "event_aggregator_mgr_test.cc", |
| ] |
| public_deps = [ |
| ":event_aggregator_mgr", |
| "$cobalt_root/src/logger:logger_test_utils", |
| "$cobalt_root/src/logger:testing_constants", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":aggregate_store_test", |
| ":aggregation_utils_test", |
| ":event_aggregator_mgr_test", |
| ":event_aggregator_test", |
| ] |
| } |