blob: 27baf95a780ab9d93d31bce25e6bb3cb59241d0b [file] [log] [blame]
# 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/testing/python_build_time_tests.gni")
python_build_time_tests("bazel_compdb_utils_test") {
tests = [ "bazel_compdb_utils_tests.py" ]
inputs = [ "bazel_compdb_utils.py" ]
}
python_build_time_tests("get_git_head_commit_test") {
tests = [ "get_git_head_commit_test.py" ]
inputs = [ "get_git_head_commit.py" ]
}
python_build_time_tests("build_utils_test") {
tests = [ "build_utils_test.py" ]
inputs = [ "build_utils.py" ]
}
python_build_time_tests("compute_content_hash_test") {
tests = [ "compute_content_hash_test.py" ]
inputs = [
"compute_content_hash.py",
"get_git_head_commit.py",
]
}
python_build_time_tests("bazel_action_utils_test") {
tests = [ "bazel_action_utils_test.py" ]
inputs = [ "bazel_action_utils.py" ]
}
python_build_time_tests("remote_services_utils_test") {
tests = [ "remote_services_utils_test.py" ]
inputs = [ "remote_services_utils_test.py" ]
}
python_build_time_tests("starlark_utils_test") {
tests = [ "starlark_utils_test.py" ]
inputs = [ "starlark_utils.py" ]
}
python_build_time_tests("workspace_utils_test") {
tests = [ "workspace_utils_test.py" ]
inputs = [
"build_utils.py",
"workspace_utils.py",
]
}
python_build_time_tests("runfiles_utils_test") {
tests = [ "runfiles_utils_test.py" ]
inputs = [ "runfiles_utils.py" ]
}
python_build_time_tests("export_host_tests_test") {
tests = [ "export_host_tests_test.py" ]
inputs = [
"build_utils.py",
"export_host_tests.py",
"runfiles_utils.py",
"workspace_utils.py",
]
}
python_build_time_tests("bazel_rust_analyzer_utils_test") {
tests = [ "bazel_rust_analyzer_utils_test.py" ]
inputs = [
"bazel_rust_analyzer_utils.py",
"build_utils.py",
]
}
if (is_host) {
python_host_test("minimal_workspace_test") {
main_source = "minimal_workspace_test.py"
sources = [
"build_utils.py",
"compute_content_hash.py",
"get_git_head_commit.py",
"minimal_workspace.py",
"remote_services_utils.py",
]
}
}
group("tests") {
testonly = true
deps = [
":bazel_action_utils_test($host_toolchain)",
":bazel_compdb_utils_test($host_toolchain)",
":bazel_rust_analyzer_utils_test($host_toolchain)",
":build_utils_test($host_toolchain)",
":export_host_tests_test($host_toolchain)",
":minimal_workspace_test($host_toolchain)",
":remote_services_utils_test",
":runfiles_utils_test($host_toolchain)",
":starlark_utils_test($host_toolchain)",
":workspace_utils_test($host_toolchain)",
]
# TODO(https://fxbug.dev/384878204): enable build-time tests once
# CI bots can run git commands properly.
if (false) {
deps += [
":compute_content_hash_test",
":get_git_head_commit_test",
":runfiles_utils_test",
]
}
}