blob: 608a043add3041a7cea7535a8f47d45c2d028d5f [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/components.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
rustc_binary("bin") {
name = "setui_client"
with_unit_tests = true
edition = "2018"
deps = [
":lib",
"//src/lib/fuchsia-async",
"//src/lib/syslog/rust:syslog",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:thiserror",
]
sources = [ "src/main.rs" ]
}
rustc_library("lib") {
name = "setui_client_lib"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.accessibility:fuchsia.accessibility-rustc",
"//sdk/fidl/fuchsia.input:fuchsia.input-rustc",
"//sdk/fidl/fuchsia.intl:fuchsia.intl-rustc",
"//sdk/fidl/fuchsia.media:fuchsia.media-rustc",
"//sdk/fidl/fuchsia.settings:fuchsia.settings-rustc",
"//sdk/fidl/fuchsia.settings.policy:fuchsia.settings.policy-rustc",
"//sdk/fidl/fuchsia.ui.types:fuchsia.ui.types-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:regex",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:uuid",
]
test_deps = [ "//third_party/rust_crates:test-case" ]
sources = [
"src/accessibility.rs",
"src/audio.rs",
"src/display.rs",
"src/do_not_disturb.rs",
"src/factory_reset.rs",
"src/input.rs",
"src/interface_tests.rs",
"src/interface_tests/accessibility_tests.rs",
"src/interface_tests/audio_tests.rs",
"src/interface_tests/display_tests.rs",
"src/interface_tests/do_not_disturb_tests.rs",
"src/interface_tests/factory_reset_tests.rs",
"src/interface_tests/input_tests.rs",
"src/interface_tests/intl_tests.rs",
"src/interface_tests/keyboard_tests.rs",
"src/interface_tests/light_tests.rs",
"src/interface_tests/night_mode_tests.rs",
"src/interface_tests/privacy_tests.rs",
"src/interface_tests/setup_tests.rs",
"src/interface_tests/volume_policy_tests.rs",
"src/intl.rs",
"src/keyboard.rs",
"src/lib.rs",
"src/light.rs",
"src/night_mode.rs",
"src/privacy.rs",
"src/setup.rs",
"src/utils.rs",
"src/volume_policy.rs",
]
}
fuchsia_package_with_single_component("setui_client") {
manifest = "meta/setui_client.cmx"
deps = [ ":bin" ]
}
fuchsia_unittest_package("setui_client_tests") {
manifest = "meta/setui_client_test.cml"
deps = [ ":lib_test" ]
}
rustc_test("setui_client_integration_test") {
edition = "2018"
deps = [
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
]
source_root = "src/integration_test.rs"
sources = [ "src/integration_test.rs" ]
}
fuchsia_component("setui-client-integration-test") {
testonly = true
deps = [ ":setui_client_integration_test" ]
manifest = "meta/setui_client_integration_test.cml"
}
fuchsia_test_package("setui-client-integration-tests") {
test_components = [ ":setui-client-integration-test" ]
}
group("tests") {
testonly = true
deps = [
":setui-client-integration-tests",
":setui_client_tests",
]
}