| # Copyright 2020 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/environments.gni") |
| import("//build/testing/host_test.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| scrutiny_target = "//src/security/scrutiny/bin($host_toolchain)" |
| scrutiny_tool = get_label_info(scrutiny_target, "root_out_dir") + "/scrutiny" |
| zbi_target = "//zircon/tools/zbi($host_toolchain)" |
| zbi_tool = get_label_info(zbi_target, "root_out_dir") + "/zbi" |
| if (host_os == "win") { |
| zbi_tool += ".exe" |
| } |
| |
| host_test("verify_build_test") { |
| binary_path = python_exe_src |
| args = [ |
| rebase_path("test_wrapper.py", root_build_dir), |
| rebase_path(python_exe_src, root_build_dir), |
| rebase_path("verify_build_test.py", root_build_dir), |
| rebase_path(scrutiny_tool, root_build_dir), |
| rebase_path(zbi_tool, root_build_dir), |
| ] |
| deps = [ |
| ":tools($host_toolchain)", |
| ":verify_build_test_data($host_toolchain)", |
| "//build/python:interpreter", |
| scrutiny_target, |
| zbi_target, |
| ] |
| } |
| |
| host_test_data("verify_build_test_data") { |
| sources = [ |
| "test_wrapper.py", |
| "verify_build.py", |
| "verify_build_test.py", |
| ] |
| } |
| |
| host_test_data("tools") { |
| sources = [ |
| scrutiny_tool, |
| zbi_tool, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":verify_build_test($host_toolchain)" ] |
| } |