blob: 5d56656197e92a9da6d59db5b44dfdd617f8fb8c [file]
# Copyright 2024 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/testing/python_build_time_tests.gni")
import("//sdk/lib/c/include/libc_headers.gni")
# All tests here should be run at build time, as they are critical
# to ensure the build works correctly.
action("integration_test") {
testonly = true
script = "//build/bazel/fuchsia_idk/generate_repository_validation.py"
inputs = [ "generate_repository.py" ] + libc_headers.idk_generate_inputs
outputs = [ "$target_out_dir/$target_name.check" ]
args = [
"--quiet",
"--stamp",
rebase_path(outputs[0], root_build_dir),
]
hermetic_inputs_file = "$target_out_dir/$target_name.hermetic_inputs"
}
if (is_host) {
python_build_time_tests("unit_tests") {
tests = [ "generate_repository_test.py" ]
inputs = [ "generate_repository.py" ] + libc_headers.idk_generate_inputs
}
}
group("tests") {
testonly = true
deps = [
":integration_test",
":unit_tests($host_toolchain)",
]
}