| # Copyright 2022 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/board.gni") |
| import("//build/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| |
| if (is_linux && has_board) { |
| go_library("emulator") { |
| sources = [ |
| "emulator.go", |
| "emulator_test.go", |
| ] |
| non_go_deps = [ |
| # Add any host_test_data deps to the `conformance_emulator_non_go_deps` |
| # group rather than directly on this target so that we can avoid breaking |
| # host tests that live in an internal petal that depends on this library. |
| ":conformance_emulator_non_go_deps", |
| ] |
| deps = [ |
| "//src/connectivity/network/testing/conformance/util", |
| "//tools/emulator", |
| "//tools/virtual_device:proto", |
| ] |
| testonly = true |
| } |
| |
| group("conformance_emulator_non_go_deps") { |
| testonly = true |
| deps = [ |
| ":zbi_bin", |
| "//build/images/network-conformance:network-conformance-base-test-data", |
| "//src/connectivity/network/testing/network-test-realm/ffx:ffx_net_test_realm_tool_test_data", |
| "//src/developer/ffx:test_data", |
| "//src/developer/ffx/plugins/component:ffx_component_tool_test_data", |
| "//src/developer/ffx/plugins/log:ffx_log_tool_test_data", |
| "//src/developer/ffx/plugins/target:ffx_target_tool_test_data", |
| ] |
| } |
| |
| go_test("conformance_emulator_test") { |
| library = ":emulator" |
| non_go_deps = [ |
| # Add any host_test_data deps to the `conformance_emulator_non_go_deps` |
| # group rather than directly on this target so that an internal petal |
| # that depends on the same libraries as this test avoids breakage. |
| ] |
| deps = [ "//src/connectivity/network/testing/conformance/ffx" ] |
| } |
| |
| out_dir = |
| "${root_out_dir}/src/connectivity/network/testing/conformance/emulator" |
| |
| host_test_data("zbi_bin") { |
| deps = [ "//zircon/tools/zbi" ] |
| sources = [ "${root_out_dir}/zbi" ] |
| outputs = [ "${out_dir}/{{source_file_part}}" ] |
| } |
| } |
| |
| group("e2e_tests") { |
| if (host_os == "linux" && has_board) { |
| deps = [ ":conformance_emulator_test($host_toolchain)" ] |
| } |
| testonly = true |
| } |