| # Copyright 2026 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/host.gni") | |
| import("//build/python/python_host_test.gni") | |
| import("//build/python/python_library.gni") | |
| if (is_host) { | |
| python_library("subcommands") { | |
| source_root = "subcommands" | |
| sources = [ | |
| "__init__.py", | |
| "add.py", | |
| "list.py", | |
| "locate.py", | |
| "metrics.py", | |
| "pool_add.py", | |
| "pool_list.py", | |
| "pool_remove.py", | |
| "remove.py", | |
| ] | |
| } | |
| _worktree_sources = [ | |
| "build_dir.py", | |
| "main.py", | |
| "tests/run_all.py", | |
| "tests/test_build_dir.py", | |
| "tests/test_metrics.py", | |
| "tests/test_pool.py", | |
| "utils.py", | |
| "worktree.py", | |
| "worktree_metrics.py", | |
| "worktree_pool.py", | |
| "worktree_printer.py", | |
| ] | |
| python_host_test("worktree_test") { | |
| main_source = "tests/run_all.py" | |
| sources = _worktree_sources | |
| libraries = [ ":subcommands" ] | |
| } | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":worktree_test($host_toolchain)" ] | |
| } |