| # 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/components/fuchsia_package.gni") |
| import("//build/python/python_host_test.gni") |
| import("//build/testing/environments.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| template("adb_e2e") { |
| if (is_host) { |
| python_host_test(target_name) { |
| main_source = "//src/developer/adb/tests/adb_e2e/src/adb_tests.py" |
| extra_args = [ |
| # adb e2e test args |
| "--adb_path", |
| rebase_path(target_out_dir, root_build_dir), |
| |
| # Python Unittest args |
| "-v", |
| ] |
| main_callable = "main" |
| deps = [ ":adb_bin" ] |
| |
| if (defined(invoker.environments)) { |
| environments = invoker.environments |
| } |
| } |
| |
| host_test_data("adb_bin") { |
| # TODO: Add this back when the test is enabled and an adb prebuilt is available. |
| sources = [ "" ] |
| outputs = [ "$target_out_dir/{{source_file_part}}" ] |
| } |
| } else { |
| not_needed(invoker, "*") |
| not_needed([ "target_name" ]) |
| } |
| } |