blob: aa8c53721670ecb831a5c3d1956c41b3e1cebd76 [file] [log] [blame]
# 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("//build/components.gni")
import("//build/host.gni")
import("//build/test.gni")
source_set("src") {
sources = [
"addr.cc",
"addr.h",
"api_abstraction.h",
"log.h",
"packet.h",
"sockscripter.cc",
"sockscripter.h",
"util.cc",
"util.h",
]
public_deps = [ "//src/lib/fxl" ]
}
executable("bin") {
output_name = "sockscripter"
sources = [ "main.cc" ]
deps = [ ":src" ]
}
test("sockscripter_test") {
testonly = true
sources = [
"addr_test.cc",
"sockscripter_test.cc",
]
deps = [
":src",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
}
install_host_tools("host") {
deps = [ ":bin" ]
outputs = [ "sockscripter" ]
}
group("sockscripter") {
deps = [
":host",
":package",
]
}
group("tests") {
testonly = true
deps = [
":sockscripter",
":sockscripter-unittest",
":sockscripter_test($host_toolchain)",
]
}
fuchsia_unittest_package("sockscripter-unittest") {
deps = [ ":sockscripter_test" ]
}
fuchsia_package("package") {
package_name = "sockscripter"
deps = [ ":bin" ]
}