| # 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/config/fuchsia/zircon_images.gni") |
| import("//build/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":term_model_tests", |
| ":terminal_tests", |
| ] |
| } |
| |
| rustc_library("lib") { |
| name = "terminal_lib" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "third_party/term-model", |
| "//garnet/bin/terminal/third_party/term-model", |
| "//sdk/fidl/fuchsia.images:fuchsia.images-rustc", |
| "//sdk/fidl/fuchsia.math:fuchsia.math-rustc", |
| "//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app-rustc", |
| "//sdk/fidl/fuchsia.ui.gfx:fuchsia.ui.gfx-rustc", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input-rustc", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic-rustc", |
| "//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views-rustc", |
| "//src/lib/cstr", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/shared-buffer", |
| "//src/lib/trace/rust:trace", |
| "//src/lib/trace/rust:trace-provider", |
| "//src/lib/ui/carnelian", |
| "//src/lib/ui/fuchsia-scenic", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:thiserror", |
| "//zircon/system/fidl/fuchsia-hardware-pty:fuchsia-hardware-pty-rustc", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| name = "terminal" |
| edition = "2018" |
| source_root = "src/bin/terminal.rs" |
| with_unit_tests = true |
| |
| deps = [ |
| ":lib", |
| "//src/lib/trace/rust:trace-provider", |
| "//src/lib/ui/carnelian", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:thiserror", |
| ] |
| } |
| |
| package("terminal") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "terminal" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/terminal.cmx") |
| dest = "terminal.cmx" |
| }, |
| ] |
| } |
| |
| config_data("tiles_with_terminal_config") { |
| for_pkg = "sysmgr" |
| sources = [ "config/tiles_with_terminal.config" ] |
| } |
| |
| zircon_extras_manifest("terminal_tests_zircon_deps.manifest") { |
| visibility = [ ":*" ] |
| manifest = "image" |
| patterns = [ "bin/sh" ] |
| } |
| |
| test_package("terminal_tests") { |
| deps = [ |
| ":lib_test", |
| ":terminal_tests_zircon_deps.manifest", |
| ] |
| |
| extra = get_target_outputs(":terminal_tests_zircon_deps.manifest") |
| |
| tests = [ |
| { |
| name = "terminal_lib_lib_test" |
| dest = "terminal_tests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| test_package("term_model_tests") { |
| deps = [ "third_party/term-model:term-model_test" ] |
| tests = [ |
| { |
| name = "term_model_lib_test" |
| environments = basic_envs |
| }, |
| ] |
| } |