| # 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/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| test("getifaddrs-test") { |
| if (is_linux || is_fuchsia) { |
| sources = [ "getifaddrs_test.cc" ] |
| } |
| deps = [ "//src/lib/fxl/test:gtest_main" ] |
| } |
| |
| fuchsia_component("getifaddrs-test-component") { |
| testonly = true |
| manifest = "meta/getifaddrs-test.cmx" |
| deps = [ ":getifaddrs-test" ] |
| } |
| |
| fuchsia_component("getifaddrs-netemul-test") { |
| testonly = true |
| manifest = "meta/getifaddrs-netemul-test.cmx" |
| deps = [ ":getifaddrs-test-component" ] |
| } |
| |
| fuchsia_test_package("getifaddrs-tests") { |
| test_components = [ ":getifaddrs-netemul-test" ] |
| deps = [ |
| "//src/connectivity/network/netstack:component-debug", |
| "//src/connectivity/network/testing/netemul/runner:netstack-cfg", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":getifaddrs-test($host_toolchain)", |
| ":getifaddrs-tests", |
| |
| # TODO(brunodalbo): move this to component level when netemul can handle it. |
| "//src/connectivity/network/testing/netemul/runner/runner:netemul-runner", |
| ] |
| } |