| # 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/components.gni") |
| import("//build/config.gni") |
| import("//src/sys/core/build/core_shard.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":sshd-host-tests" ] |
| } |
| |
| source_set("sshd_constants") { |
| sources = [ "constants.h" ] |
| } |
| |
| source_set("lib") { |
| sources = [ "service.cc" ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_hlcpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "sshd-host" |
| sources = [ "sshd-host.cc" ] |
| deps = [ |
| ":lib", |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_package_with_single_component("sshd-host") { |
| manifest = "meta/sshd-host.cml" |
| deps = [ |
| # Ensure this isn't included in production |
| "//build/validate:non_production_tag", |
| |
| # Used by programs that need to load ICU locale data, such as tz-util. |
| ":bin", |
| "//src/intl:icudtl", |
| "//third_party/openssh-portable:hostkeygen", |
| "//third_party/openssh-portable:scp", |
| "//third_party/openssh-portable:sftp-server", |
| "//third_party/openssh-portable:sshd", |
| ] |
| } |
| |
| core_shard("core_shard") { |
| shard_file = "meta/sshd-host.core_shard.cml" |
| } |
| |
| config_data("config") { |
| for_pkg = "sshd-host" |
| sources = [ "//third_party/openssh-portable/fuchsia/sshd_config" ] |
| outputs = [ "sshd_config" ] |
| } |
| |
| executable("test") { |
| testonly = true |
| output_name = "sshd-host-test" |
| sources = [ "test.cc" ] |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_hlcpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_unittest_package("sshd-host-tests") { |
| manifest = "meta/sshd-host-test.cml" |
| deps = [ ":test" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |