blob: 3bd3d1075999df639d72e08aa013bade4bdb9646 [file] [log] [blame]
# Copyright 2018 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/config.gni")
import("//build/package.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
source_set("lib") {
sources = [
"service.cc",
]
public_deps = [
"//garnet/lib/chrealm",
"//garnet/public/lib/fsl",
"//src/lib/fxl",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/fdio",
"//zircon/public/lib/zx",
]
}
executable("bin") {
output_name = "sshd-host"
sources = [
"sshd-host.cc",
]
deps = [
":lib",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/fdio",
]
}
package("sshd-host") {
deprecated_shell = "//build"
deps = [
":bin",
"//third_party/openssh-portable:hostkeygen",
"//third_party/openssh-portable:scp",
"//third_party/openssh-portable:sftp-server",
"//third_party/openssh-portable:sshd",
]
binaries = [
{
name = "sshd-host"
},
{
name = "hostkeygen"
},
{
name = "scp"
},
{
name = "sftp-server"
},
{
name = "sshd"
},
]
meta = [
{
path = rebase_path("meta/sshd-host.cmx")
dest = "sshd-host.cmx"
},
]
}
config_data("config") {
for_pkg = "sshd-host"
sources = [
rebase_path("//third_party/openssh-portable/fuchsia/sshd_config"),
]
outputs = [
"sshd_config",
]
}
executable("test") {
testonly = true
output_name = "sshd-host-test"
sources = [
"test.cc",
]
deps = [
":lib",
"//src/lib/fxl/test:gtest_main",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/fdio",
"//zircon/public/lib/zx",
]
}
test_package("sshd-host-tests") {
deps = [
":test",
]
tests = [
{
name = "sshd-host-test"
environments = basic_envs
},
]
}