| # Copyright 2023 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/python/python_library.gni") | |
| import("//build/python/python_mobly_test.gni") | |
| import("//build/testing/host_test_data.gni") | |
| # This file can appear in e2e tests which are processed by more than just | |
| # the host toolchain. | |
| if (is_host) { | |
| python_mobly_test("ffx_host_tool_e2e_test") { | |
| main_source = "main.py" | |
| libraries = [ | |
| ":ffx_test_case", | |
| "//src/testing/end_to_end/honeydew", | |
| "//src/testing/end_to_end/mobly_base_tests/fuchsia_base_test", | |
| ] | |
| environments = [ | |
| emu_env, | |
| nuc7_env, | |
| nuc11_env, | |
| ] | |
| } | |
| python_mobly_test("ffx_strict_host_tool_e2e_test") { | |
| main_source = "ffx_strict.py" | |
| libraries = [ | |
| ":ffx_test_case", | |
| "//src/testing/end_to_end/honeydew", | |
| "//src/testing/end_to_end/mobly_base_tests/fuchsia_base_test", | |
| ] | |
| test_data_deps = [ ":strict_example_files" ] | |
| environments = [ | |
| emu_env, | |
| nuc7_env, | |
| nuc11_env, | |
| ] | |
| } | |
| host_test_data("strict_example_files") { | |
| sources = [ | |
| "//src/developer/ffx/docs/examples/strict/ffx.py", | |
| "//src/developer/ffx/docs/examples/strict/strict.py", | |
| ] | |
| outputs = [ "$root_out_dir/test_data/strict_example/{{source_file_part}}" ] | |
| } | |
| python_mobly_test("direct_conn_e2e_test") { | |
| main_source = "direct_conn.py" | |
| libraries = [ | |
| ":ffx_test_case", | |
| "//src/testing/end_to_end/honeydew", | |
| "//src/testing/end_to_end/mobly_base_tests/fuchsia_base_test", | |
| ] | |
| environments = [ | |
| emu_env, | |
| nuc7_env, | |
| nuc11_env, | |
| ] | |
| } | |
| python_mobly_test("direct_daemon_e2e_test") { | |
| main_source = "direct_daemon.py" | |
| libraries = [ | |
| ":ffx_test_case", | |
| "//src/testing/end_to_end/honeydew", | |
| "//src/testing/end_to_end/mobly_base_tests/fuchsia_base_test", | |
| ] | |
| environments = [ | |
| emu_env, | |
| nuc7_env, | |
| nuc11_env, | |
| ] | |
| } | |
| # This isn't included in ":tests" because it is flaky and may not be fixable | |
| # given its nature. | |
| python_mobly_test("stress_e2e_test") { | |
| main_source = "stress.py" | |
| libraries = [ | |
| ":ffx_test_case", | |
| "//src/testing/end_to_end/honeydew", | |
| "//src/testing/end_to_end/mobly_base_tests/fuchsia_base_test", | |
| ] | |
| package_deps = [ "//src/developer/ffx/tools/speedtest/target:speedtest" ] | |
| test_data_deps = | |
| [ "//src/developer/ffx/tools/speedtest:ffx_speedtest_tool_test_data" ] | |
| environments = [ | |
| emu_env, | |
| nuc7_env, | |
| nuc11_env, | |
| ] | |
| } | |
| python_library("ffx_test_case") { | |
| visibility = [ ":*" ] | |
| testonly = true | |
| library_name = "ffxtestcase" | |
| source_root = "//src/developer/ffx/tests/e2e/python" | |
| sources = [ "__init__.py" ] | |
| library_deps = [ | |
| "//src/testing/end_to_end/honeydew", | |
| "//src/testing/end_to_end/mobly_base_tests/fuchsia_base_test", | |
| ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| public_deps = [ | |
| ":direct_conn_e2e_test($host_toolchain)", | |
| ":direct_daemon_e2e_test($host_toolchain)", | |
| ":ffx_host_tool_e2e_test($host_toolchain)", | |
| ":ffx_strict_host_tool_e2e_test($host_toolchain)", | |
| ] | |
| } | |
| } |