| # 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/python/python_host_test.gni") |
| import("//build/python/python_library.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":cl_utils_test($host_toolchain)", |
| ":cxx_remote_wrapper_test($host_toolchain)", |
| ":cxx_test($host_toolchain)", |
| ":depfile_test($host_toolchain)", |
| ":dlwrap_test($host_toolchain)", |
| ":fuchsia_test($host_toolchain)", |
| ":output_leak_scanner_test($host_toolchain)", |
| ":prebuilt_tool_remote_wrapper_test($host_toolchain)", |
| ":relativize_args_test($host_toolchain)", |
| ":remote_action_test($host_toolchain)", |
| ":remotetool_test($host_toolchain)", |
| ":rustc_remote_wrapper_test($host_toolchain)", |
| ":rustc_test($host_toolchain)", |
| ":textpb_test($host_toolchain)", |
| ] |
| } |
| |
| if (is_host) { |
| # TODO: python_library() doesn't work with the current source structure. |
| # It wants one __init__.py per library with one library per directory. |
| # As a workaround, we expand lists of sources instead of a proper |
| # dependency tree of libraries. :( |
| _fuchsia_sources = [ "fuchsia.py" ] |
| _cl_utils_sources = [ "cl_utils.py" ] |
| _depfile_sources = [ "depfile.py" ] |
| _output_leak_scanner_sources = |
| [ "output_leak_scanner.py" ] + _fuchsia_sources + _cl_utils_sources |
| _textpb_sources = [ "textpb.py" ] |
| |
| _remotetool_sources = |
| [ "remotetool.py" ] + _fuchsia_sources + _cl_utils_sources |
| _remote_action_sources = |
| [ "remote_action.py" ] + _fuchsia_sources + _cl_utils_sources + |
| [ "output_leak_scanner.py" ] + _depfile_sources + _textpb_sources + |
| [ "remotetool.py" ] |
| _dlwrap_sources = [ "dlwrap.py" ] + _remote_action_sources |
| _cxx_sources = [ "cxx.py" ] + _cl_utils_sources |
| _cxx_remote_wrapper_sources = |
| [ "cxx_remote_wrapper.py" ] + _cxx_sources + _fuchsia_sources + |
| _cl_utils_sources + _remote_action_sources |
| _rustc_sources = [ "rustc.py" ] + _cl_utils_sources |
| _rustc_remote_wrapper_sources = |
| [ "rustc_remote_wrapper.py" ] + _rustc_sources + _remote_action_sources + |
| _fuchsia_sources + _cl_utils_sources |
| _prebuilt_tool_remote_wrapper_sources = |
| [ "prebuilt_tool_remote_wrapper.py" ] + _fuchsia_sources + |
| _cl_utils_sources + _remote_action_sources |
| |
| python_library("cl_utils") { |
| sources = _cl_utils_sources |
| } |
| python_host_test("cl_utils_test") { |
| main_source = "cl_utils_test.py" |
| sources = _cl_utils_sources |
| } |
| |
| python_library("cxx") { |
| sources = _cxx_sources |
| } |
| python_host_test("cxx_test") { |
| main_source = "cxx_test.py" |
| sources = _cxx_sources |
| } |
| |
| python_library("cxx_remote_wrapper") { |
| sources = _cxx_remote_wrapper_sources |
| } |
| python_host_test("cxx_remote_wrapper_test") { |
| main_source = "cxx_remote_wrapper_test.py" |
| sources = _cxx_remote_wrapper_sources |
| } |
| |
| python_library("depfile") { |
| sources = _depfile_sources |
| } |
| python_host_test("depfile_test") { |
| main_source = "depfile_test.py" |
| sources = _depfile_sources |
| } |
| |
| python_library("dlwrap") { |
| sources = _dlwrap_sources |
| } |
| python_host_test("dlwrap_test") { |
| main_source = "dlwrap_test.py" |
| sources = _dlwrap_sources |
| } |
| |
| python_library("fuchsia") { |
| sources = _fuchsia_sources |
| } |
| python_host_test("fuchsia_test") { |
| main_source = "fuchsia_test.py" |
| sources = _fuchsia_sources |
| } |
| |
| python_library("output_leak_scanner") { |
| sources = _output_leak_scanner_sources |
| } |
| python_host_test("output_leak_scanner_test") { |
| main_source = "output_leak_scanner_test.py" |
| sources = _output_leak_scanner_sources |
| } |
| |
| python_library("prebuilt_tool_remote_wrapper") { |
| sources = _prebuilt_tool_remote_wrapper_sources |
| } |
| python_host_test("prebuilt_tool_remote_wrapper_test") { |
| main_source = "prebuilt_tool_remote_wrapper_test.py" |
| sources = _prebuilt_tool_remote_wrapper_sources |
| } |
| |
| python_library("relativize_args") { |
| sources = [ "relativize_args.py" ] |
| } |
| python_host_test("relativize_args_test") { |
| main_source = "relativize_args_test.py" |
| sources = [ "relativize_args.py" ] |
| } |
| |
| python_library("remote_action") { |
| sources = _remote_action_sources |
| } |
| python_host_test("remote_action_test") { |
| main_source = "remote_action_test.py" |
| sources = _remote_action_sources |
| } |
| |
| python_library("remotetool") { |
| sources = _remotetool_sources |
| } |
| python_host_test("remotetool_test") { |
| main_source = "remotetool_test.py" |
| sources = _remotetool_sources |
| } |
| |
| python_library("rustc") { |
| sources = _rustc_sources |
| } |
| python_host_test("rustc_test") { |
| main_source = "rustc_test.py" |
| sources = _rustc_sources |
| } |
| |
| python_library("rustc_remote_wrapper") { |
| sources = _rustc_remote_wrapper_sources |
| } |
| python_host_test("rustc_remote_wrapper_test") { |
| main_source = "rustc_remote_wrapper_test.py" |
| sources = _rustc_remote_wrapper_sources |
| } |
| |
| python_library("textpb") { |
| sources = _textpb_sources |
| } |
| python_host_test("textpb_test") { |
| main_source = "textpb_test.py" |
| sources = _textpb_sources |
| } |
| } |