blob: 70cc4da7868d047699e98ec0276ad7c33a55cdb3 [file] [log] [blame]
# Copyright 2017 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("//build/test.gni")
config("rappor_config") {
# Use O3 level optimizations for building RAPPOR.
cflags = [ "-O3" ]
configs = [ "$cobalt_root:cobalt_config" ]
}
source_set("rappor_config_validator") {
sources = [
"rappor_config_validator.cc",
]
deps = [
"$cobalt_root/src:logging",
]
public_deps = [
"$cobalt_root/src/pb",
"$cobalt_root/src/registry:cobalt_registry_proto",
"$cobalt_root/src/system_data:client_secret",
"$cobalt_root/src/system_data:client_secret",
]
configs += [ ":rappor_config" ]
}
source_set("rappor_encoder") {
sources = [
"rappor_encoder.cc",
]
deps = [
":rappor_config_validator",
"$cobalt_root/src:logging",
"$cobalt_root/src:tracing",
"$cobalt_root/src/system_data:client_secret",
]
public_deps = [
"$cobalt_root/src/lib/crypto_util",
"$cobalt_root/src/pb",
]
configs += [ ":rappor_config" ]
}
source_set("rappor_config_helper") {
sources = [
"rappor_config_helper.cc",
]
public_deps = [
"$cobalt_root/src/registry:cobalt_registry_proto",
]
deps = [
"$cobalt_root/src:logging",
]
configs += [ ":rappor_config" ]
}
test("rappor_tests") {
sources = [
"rappor_config_helper_test.cc",
"rappor_encoder_test.cc",
"rappor_test_utils.cc",
"rappor_test_utils_test.cc",
]
deps = [
":rappor_config_helper",
":rappor_encoder",
"$cobalt_root/src:logging",
"//third_party/gflags",
"//third_party/googletest:gtest",
"//third_party/googletest:gtest_main",
"//third_party/grpc:grpc++",
]
configs += [ ":rappor_config" ]
}
group("tests") {
testonly = true
deps = [
":rappor_tests",
]
}