blob: 6672eba5024982c0b62258ba320288540bd937a4 [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/package.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
source_set("src") {
sources = [
"addr.cc",
"addr.h",
"api_abstraction.h",
"log.h",
"sockscripter.cc",
"sockscripter.h",
"util.cc",
"util.h",
]
public_deps = [ "//src/lib/fxl" ]
}
executable("bin") {
output_name = "sockscripter"
sources = [ "main.cc" ]
deps = [ ":src" ]
}
executable("sockscripter_test") {
testonly = true
sources = [
"addr_test.cc",
"sockscripter_test.cc",
]
deps = [
":src",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
group("sockscripter") {
deps = [
":bin($host_toolchain)",
":package",
]
}
group("tests") {
testonly = true
deps = [
":sockscripter",
":sockscripter_test($host_toolchain)",
":sockscripter_unittest",
]
}
unittest_package("sockscripter_unittest") {
deps = [ ":sockscripter_test" ]
tests = [
{
name = "sockscripter_test"
environments = [ qemu_env ]
},
]
}
package("package") {
package_name = "sockscripter"
deps = [ ":bin" ]
binaries = [
{
name = "sockscripter"
shell = true
},
]
meta = [
{
path = rebase_path("meta/sockscripter.cmx")
dest = "sockscripter.cmx"
},
]
}