| # 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. |
| |
| visibility = [ "$cobalt_root/*" ] |
| |
| import("//third_party/protobuf/proto_library.gni") |
| |
| proto_library("clearcut_proto") { |
| sources = [ "clearcut.proto" ] |
| import_protobuf_full = true |
| generate_python = false |
| cc_generator_options = "lite" |
| } |
| |
| source_set("clearcut") { |
| sources = [ |
| "uploader.cc", |
| "uploader.h", |
| ] |
| configs += [ "$cobalt_root:cobalt_config" ] |
| public_deps = [ |
| ":clearcut_proto", |
| "$cobalt_root/src:logging", |
| "$cobalt_root/src/lib/statusor:statusor", |
| "$cobalt_root/src/lib/util:clock", |
| "$cobalt_root/src/lib/util:sleeper", |
| "$cobalt_root/src/lib/util:status", |
| "$cobalt_root/src/logger:internal_metrics", |
| "$cobalt_root/src/public/lib:http_client", |
| "//third_party/abseil-cpp", |
| ] |
| visibility += [ "//src/cobalt/bin/utils:fuchsia_http_client" ] |
| } |
| |
| source_set("uploader_test") { |
| testonly = true |
| sources = [ "uploader_test.cc" ] |
| configs += [ "$cobalt_root:cobalt_config" ] |
| deps = [ |
| ":clearcut", |
| "//third_party/gflags", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":uploader_test" ] |
| } |
| |
| source_set("curl_http_client") { |
| sources = [ "curl_http_client.cc" ] |
| |
| deps = [ |
| ":curl_handle", |
| "//third_party/curl:libcurl", |
| ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| } |
| |
| source_set("curl_handle") { |
| sources = [ "curl_handle.cc" ] |
| |
| deps = [ "//third_party/curl:libcurl" ] |
| |
| configs += [ "$cobalt_root:cobalt_config" ] |
| configs -= [ "//build/config:no_exceptions" ] |
| } |