| # Copyright 2021 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/assembly/config_data_for_assembly.gni") |
| import("//build/config.gni") |
| |
| # The list of FIRE configuration templates in the current directory. Files that are not listed |
| # in this variable will be ignored. |
| |
| project_files = [ |
| "cpu.json5", |
| "crashes.json5", |
| "escrow.json5", |
| "minfs.json5", |
| ] |
| |
| config_data_for_assembly("fire_config_projects") { |
| for_pkg = "sampler" |
| sources = project_files |
| outputs = [ "fire/fuchsia/projects/{{source_file_part}}" ] |
| } |
| |
| # Validate FIRE project config |
| |
| resource("config-validation-resources") { |
| sources = project_files |
| |
| # The component will see this as /pkg/config/fire/fuchsia/projects/foo.json5 |
| outputs = [ "config/fire/fuchsia/projects/{{source_file_part}}" ] |
| } |
| |
| # Test component for config validation. |
| fuchsia_unittest_component("config-validation-component") { |
| deps = [ |
| ":config-validation-resources", |
| "//src/diagnostics/sampler/tests:config-validation", |
| ] |
| } |
| |
| # This target name must be unique in the build tree |
| fuchsia_test_package("fire-projects-validation-package-src-diagnostics") { |
| test_components = [ ":config-validation-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fire-projects-validation-package-src-diagnostics" ] |
| } |