| # 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/config.gni") |
| import("//build/test.gni") |
| import("//build/testing/environments.gni") |
| import("//src/sys/build/fuchsia_test_package.gni") |
| import("//src/sys/build/fuchsia_unittest_component.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":weavestack-adaptation-unittests" ] |
| } |
| |
| fuchsia_unittest_component("ble-manager-test") { |
| manifest = rebase_path("meta/ble_manager_unittests.cmx") |
| deps = [ ":ble_manager_unittests" ] |
| } |
| |
| fuchsia_unittest_component("configuration-manager-test") { |
| manifest = rebase_path("meta/configuration_manager_unittests.cmx") |
| deps = [ ":configuration_manager_unittests" ] |
| } |
| |
| fuchsia_unittest_component("connectivity-manager-test") { |
| manifest = rebase_path("meta/connectivity_manager_unittests.cmx") |
| deps = [ ":connectivity_manager_unittests" ] |
| } |
| |
| fuchsia_unittest_component("group-key-store-test") { |
| manifest = rebase_path("meta/group_key_store_unittests.cmx") |
| deps = [ ":group_key_store_unittests" ] |
| } |
| |
| fuchsia_unittest_component("platform-case-auth-delegate-test") { |
| manifest = rebase_path("meta/platform_case_auth_delegate_unittests.cmx") |
| deps = [ ":platform_case_auth_delegate_unittests" ] |
| } |
| |
| fuchsia_unittest_component("platform-manager-test") { |
| manifest = rebase_path("meta/platform_manager_unittests.cmx") |
| deps = [ ":platform_manager_unittests" ] |
| } |
| |
| fuchsia_unittest_component("thread-stack-manager-test") { |
| manifest = rebase_path("meta/thread_stack_manager_unittests.cmx") |
| deps = [ ":thread_stack_manager_unittests" ] |
| } |
| |
| fuchsia_unittest_component("warm-platform-support-test") { |
| manifest = rebase_path("meta/warm_platform_support_unittests.cmx") |
| deps = [ ":warm_platform_support_unittests" ] |
| } |
| |
| fuchsia_unittest_component("weave-config-manager-test") { |
| manifest = rebase_path("meta/weave_config_manager_unittests.cmx") |
| deps = [ ":weave_config_manager_unittests" ] |
| } |
| |
| fuchsia_unittest_component("weave-inspector-test") { |
| manifest = rebase_path("meta/weave_inspector_unittests.cmx") |
| deps = [ ":weave_inspector_unittests" ] |
| } |
| |
| test("ble_manager_unittests") { |
| output_name = "ble_manager_unittests" |
| sources = [ "ble_manager_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("configuration_manager_unittests") { |
| output_name = "configuration_manager_unittests" |
| sources = [ "configuration_manager_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("connectivity_manager_unittests") { |
| output_name = "connectivity_manager_unittests" |
| sources = [ "connectivity_manager_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("group_key_store_unittests") { |
| output_name = "group_key_store_unittests" |
| sources = [ "group_key_store_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("platform_case_auth_delegate_unittests") { |
| output_name = "platform_case_auth_delegate_unittests" |
| sources = [ "platform_case_auth_delegate_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("platform_manager_unittests") { |
| output_name = "platform_manager_unittests" |
| sources = [ "platform_manager_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("thread_stack_manager_unittests") { |
| output_name = "thread_stack_manager_unittests" |
| sources = [ "thread_stack_manager_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("warm_platform_support_unittests") { |
| output_name = "warm_platform_support_unittests" |
| sources = [ "warm_unittests.cpp" ] |
| deps = [ ":common_test_deps" ] |
| } |
| |
| test("weave_config_manager_unittests") { |
| output_name = "weave_config_manager_unittests" |
| sources = [ "weave_config_manager_unittests.cpp" ] |
| deps = [ |
| ":common_test_deps", |
| "//src/lib/files:files", |
| ] |
| } |
| |
| test("weave_inspector_unittests") { |
| output_name = "weave_inspector_unittests" |
| sources = [ "weave_inspector_unittests.cpp" ] |
| deps = [ |
| ":common_test_deps", |
| "//sdk/lib/inspect/testing/cpp", |
| ] |
| } |
| |
| resource("weavestack-adaptation-resources") { |
| sources = [ |
| "../../weavestack/data/default_environment_schema.json", |
| "../../weavestack/data/device_info_schema.json", |
| "testdata/config.json", |
| "testdata/default_store.json", |
| "testdata/default_store_schema.json", |
| "testdata/invalid_default_store.json", |
| "testdata/test_mfr_cert", |
| "testdata/test_mfr_private_key", |
| ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| config_data("weavestack-adaptation-config") { |
| for_pkg = "weavestack-adaptation-unittests" |
| sources = [ |
| "testdata/default_environment.json", |
| "testdata/device_info.json", |
| "testdata/device_info_alt.json", |
| ] |
| } |
| |
| group("common_test_deps") { |
| testonly = true |
| public_deps = [ |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/syslog/cpp:backend_legacy", |
| "//src/connectivity/weave/adaptation", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| fuchsia_test_package("weavestack-adaptation-unittests") { |
| test_components = [ |
| ":ble-manager-test", |
| ":configuration-manager-test", |
| ":connectivity-manager-test", |
| ":group-key-store-test", |
| ":platform-case-auth-delegate-test", |
| ":platform-manager-test", |
| ":thread-stack-manager-test", |
| ":warm-platform-support-test", |
| ":weave-config-manager-test", |
| ":weave-inspector-test", |
| ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| ":weavestack-adaptation-config", |
| ":weavestack-adaptation-resources", |
| ] |
| } |