| # 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//src/sys/build/components.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.hardware.pty:fuchsia.hardware.pty-rustc", |
| "//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/diagnostics/inspect/rust", |
| "//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:euclid", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/app.rs", |
| "src/key_util.rs", |
| "src/lib.rs", |
| "src/pty.rs", |
| "src/terminal_view.rs", |
| "src/ui/mod.rs", |
| "src/ui/terminal_scene.rs", |
| "src/ui/terminal_views.rs", |
| ] |
| |
| inputs = [ "//prebuilt/third_party/fonts/robotomono/RobotoMono-Regular.ttf" ] |
| } |
| |
| rustc_binary("bin") { |
| name = "terminal" |
| edition = "2018" |
| source_root = "src/bin/terminal.rs" |
| with_unit_tests = true |
| |
| deps = [ |
| ":lib", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/trace/rust:trace-provider", |
| "//src/lib/ui/carnelian", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ "src/bin/terminal.rs" ] |
| } |
| |
| fuchsia_package_with_single_component("terminal") { |
| manifest = "meta/terminal.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| config_data("tiles_config") { |
| for_pkg = "sysmgr" |
| sources = [ "config/tiles.config" ] |
| } |
| |
| fuchsia_test_component("terminal_tests_component") { |
| component_name = "terminal_tests" |
| manifest = "meta/terminal_tests.cmx" |
| deps = [ |
| ":lib_test", |
| "//src/lib/zircon/rust:exit_with_code_util", |
| "//zircon/third_party/uapp/dash", |
| ] |
| } |
| |
| fuchsia_test_package("terminal_tests") { |
| test_components = [ ":terminal_tests_component" ] |
| } |
| |
| fuchsia_test_component("term_model_tests_component") { |
| component_name = "term_model_tests" |
| manifest = "meta/term_model_lib_test.cmx" |
| deps = [ "third_party/term-model:term-model_test" ] |
| } |
| |
| fuchsia_test_package("term_model_tests") { |
| test_components = [ ":term_model_tests_component" ] |
| } |