| # Copyright 2016 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/package.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| source_set("errors") { |
| sources = [ |
| "http_error_list.h", |
| "http_errors.cc", |
| "http_errors.h", |
| ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| ] |
| } |
| |
| source_set("lib") { |
| # if you don't need HTTPS, comment out NETWORK_SERVICE_USE_HTTPS in |defines| below. |
| defines = [ "NETWORK_SERVICE_USE_HTTPS" ] |
| |
| sources = [ |
| "http_adapters.cc", |
| "http_adapters.h", |
| "http_client.h", |
| "http_service_delegate.cc", |
| "http_service_delegate.h", |
| "http_service_impl.cc", |
| "http_service_impl.h", |
| "http_url_loader_impl.cc", |
| "http_url_loader_impl.h", |
| "upload_element_reader.cc", |
| "upload_element_reader.h", |
| ] |
| |
| deps = [ |
| "//src/lib/url", |
| "//third_party/asio", |
| "//third_party/boringssl:boringssl", |
| "//zircon/public/lib/zx", |
| ] |
| |
| public_deps = [ |
| ":errors", |
| "//garnet/public/lib/fsl", |
| "//sdk/fidl/fuchsia.net.oldhttp", |
| "//sdk/fidl/fuchsia.netstack", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/fit", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "http" |
| |
| sources = [ |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//garnet/public/lib/fsl", |
| "//src/lib/fxl", |
| ] |
| } |
| |
| package("http") { |
| deps = [ |
| ":bin", |
| ] |
| |
| binary = "http" |
| |
| meta = [ |
| { |
| path = rebase_path("meta/http.cmx") |
| dest = "http.cmx" |
| }, |
| ] |
| } |
| |
| executable("http_service_tests_bin") { |
| testonly = true |
| |
| sources = [ |
| "upload_element_reader_unittest.cc", |
| ] |
| |
| output_name = "http_service_tests" |
| |
| deps = [ |
| ":lib", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| test_package("http_service_tests") { |
| deps = [ |
| ":http_service_tests_bin", |
| ] |
| |
| tests = [ |
| { |
| name = "http_service_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |