| # Copyright 2020 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_test.gni") |
| |
| rustc_test("ot-radio-ncp-ver-query-bin") { |
| name = "ot_radio_ncp_ver_query" |
| source_root = "real-device/ot_radio_ncp_ver_query.rs" |
| edition = "2018" |
| deps = [ |
| "//src/connectivity/openthread/tests/lib", |
| "//src/connectivity/openthread/tests/test-code", |
| "//src/lib/fuchsia-async", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/syslog" ] |
| sources = [ "real-device/ot_radio_ncp_ver_query.rs" ] |
| } |
| |
| fuchsia_unittest_component("ot-radio-ncp-ver-query") { |
| manifest = "meta/ot-radio-ncp-ver-query.cmx" |
| deps = [ ":ot-radio-ncp-ver-query-bin" ] |
| } |
| |
| rustc_test("ot-stack-ncp-ver-query-bin") { |
| name = "ot_stack_ncp_ver_query" |
| source_root = "real-device/ot_stack_ncp_ver_query.rs" |
| edition = "2018" |
| deps = [ |
| "//src/connectivity/openthread/tests/lib", |
| "//src/connectivity/openthread/tests/test-code", |
| "//src/lib/fuchsia-async", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/syslog" ] |
| sources = [ "real-device/ot_stack_ncp_ver_query.rs" ] |
| } |
| |
| fuchsia_unittest_component("ot-stack-ncp-ver-query") { |
| manifest = "meta/ot-stack-ncp-ver-query.cmx" |
| deps = [ ":ot-stack-ncp-ver-query-bin" ] |
| } |
| |
| rustc_test("ot-stack-soft-reset-bin") { |
| name = "ot_stack_soft_reset" |
| source_root = "real-device/ot_stack_soft_reset.rs" |
| edition = "2018" |
| deps = [ |
| "//src/connectivity/openthread/tests/lib", |
| "//src/connectivity/openthread/tests/test-code", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/syslog" ] |
| sources = [ "real-device/ot_stack_soft_reset.rs" ] |
| } |
| |
| fuchsia_unittest_component("ot-stack-soft-reset") { |
| manifest = "meta/ot-stack-soft-reset.cmx" |
| deps = [ ":ot-stack-soft-reset-bin" ] |
| } |
| |
| fuchsia_test_package("ot-radio-tests") { |
| test_components = [ |
| ":ot-radio-ncp-ver-query", |
| ":ot-stack-ncp-ver-query", |
| ":ot-stack-soft-reset", |
| ] |
| } |
| |
| rustc_test("ot-stack-ncp-ver-query-mock") { |
| name = "ot_stack_ncp_ver_query_mock" |
| source_root = "mock-device/ot_stack_ncp_ver_query_mock.rs" |
| edition = "2018" |
| deps = [ |
| "//sdk/fidl/fuchsia.lowpan.spinel:fuchsia.lowpan.spinel-rustc", |
| "//src/connectivity/openthread/tests/lib", |
| "//src/connectivity/openthread/tests/test-code", |
| "//src/lib/fuchsia-async", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/syslog" ] |
| |
| sources = [ "mock-device/ot_stack_ncp_ver_query_mock.rs" ] |
| } |
| |
| rustc_test("ot-stack-soft-reset-mock") { |
| name = "ot_stack_soft_reset_mock" |
| source_root = "mock-device/ot_stack_soft_reset_mock.rs" |
| edition = "2018" |
| deps = [ |
| "//sdk/fidl/fuchsia.lowpan.spinel:fuchsia.lowpan.spinel-rustc", |
| "//src/connectivity/openthread/tests/lib", |
| "//src/connectivity/openthread/tests/test-code", |
| "//src/lib/fuchsia-async", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/syslog" ] |
| |
| sources = [ "mock-device/ot_stack_soft_reset_mock.rs" ] |
| } |
| |
| rustc_test("ot-radio-ncp-ver-query-mock") { |
| name = "ot_radio_ncp_ver_query_mock" |
| source_root = "mock-device/ot_radio_ncp_ver_query_mock.rs" |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.lowpan.spinel:fuchsia.lowpan.spinel-rustc", |
| "//src/connectivity/openthread/tests/lib", |
| "//src/connectivity/openthread/tests/test-code", |
| "//src/lib/fuchsia-async", |
| "//src/lib/syslog/rust:syslog", |
| ] |
| non_rust_deps = [ "//zircon/system/ulib/syslog" ] |
| |
| sources = [ "mock-device/ot_radio_ncp_ver_query_mock.rs" ] |
| } |
| |
| fuchsia_component("ot-radio-ncp-ver-query-mock-component") { |
| testonly = true |
| manifest = "meta/ot-radio-ncp-ver-query-mock.cmx" |
| deps = [ |
| ":ot-radio-ncp-ver-query-mock", |
| "//src/connectivity/openthread/tests/ot-devmgr:ot-devmgr-component-integration", |
| ] |
| } |
| |
| fuchsia_component("ot-stack-ncp-ver-query-mock-component") { |
| testonly = true |
| manifest = "meta/ot-stack-ncp-ver-query-mock.cmx" |
| deps = [ |
| ":ot-stack-ncp-ver-query-mock", |
| "//src/connectivity/openthread/ot-stack:ot-stack-v1", |
| "//src/connectivity/openthread/tests/ot-devmgr:ot-devmgr-component-integration", |
| ] |
| } |
| |
| fuchsia_component("ot-stack-soft-reset-mock-component") { |
| testonly = true |
| manifest = "meta/ot-stack-soft-reset-mock.cmx" |
| deps = [ |
| ":ot-stack-soft-reset-mock", |
| "//src/connectivity/openthread/ot-stack:ot-stack-v1", |
| "//src/connectivity/openthread/tests/ot-devmgr:ot-devmgr-component-integration", |
| ] |
| } |
| |
| fuchsia_test_package("ot-radio-component-tests") { |
| package_name = "ot-radio-component-tests" |
| test_components = [ ":ot-radio-ncp-ver-query-mock-component" ] |
| } |
| |
| fuchsia_test_package("ot-stack-component-tests") { |
| package_name = "ot-stack-component-tests" |
| test_components = [ |
| ":ot-stack-ncp-ver-query-mock-component", |
| ":ot-stack-soft-reset-mock-component", |
| ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |