blob: d85c95846d2045707918afc70b1ab9bce2ca2345 [file] [log] [blame]
# 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",
"//sdk/fidl/fuchsia.net.oldhttp",
"//sdk/fidl/fuchsia.netstack",
"//sdk/lib/sys/cpp",
"//src/lib/fsl",
"//src/lib/fxl",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/fit",
]
}
executable("bin") {
output_name = "http"
sources = [ "main.cc" ]
deps = [
":lib",
"//src/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",
"//src/lib/fxl/test:gtest_main",
]
# TODO(46731): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
test_package("http_service_tests") {
deps = [ ":http_service_tests_bin" ]
tests = [
{
name = "http_service_tests"
environments = basic_envs
},
]
}