blob: a77b1bd53ee635107de8da44d83d1e9cd8fb55c6 [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/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
group("tests") {
testonly = true
deps = [ ":default_hardware_ime_tests" ]
}
rustc_binary("bin") {
name = "default_hardware_ime"
with_unit_tests = true
edition = "2018"
deps = [
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input-rustc",
"//sdk/fidl/fuchsia.ui.input2:fuchsia.ui.input2-rustc",
"//sdk/fidl/fuchsia.ui.text:fuchsia.ui.text-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/ui/lib/text",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:thiserror",
]
sources = [
"src/keymap.rs",
"src/main.rs",
]
}
package("default_hardware_ime") {
deps = [ ":bin" ]
meta = [
{
path = rebase_path("meta/default_hardware_ime.cmx")
dest = "default_hardware_ime.cmx"
},
]
resources = [
{
path = rebase_path("assets/us.json")
dest = "us.json"
},
{
path = rebase_path("assets/us-legacy.json")
dest = "us-legacy.json"
},
]
binaries = [
{
name = "default_hardware_ime"
},
]
}
test_package("default_hardware_ime_tests") {
resources = [
{
path = rebase_path("assets/us.json")
dest = "us.json"
},
{
path = rebase_path("assets/us-legacy.json")
dest = "us-legacy.json"
},
]
deps = [ ":bin_test" ]
tests = [
{
name = "default_hardware_ime_bin_test"
dest = "default_hardware_ime_unittests"
environments = basic_envs
},
]
}