| # 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/assembly/config_data_for_assembly.gni") |
| import("//build/config.gni") |
| import("//src/diagnostics/triage/build/triage_config_test.gni") |
| |
| # The list of triage configuration files in the current directory that |
| # are used to implement the `fx triage` command. Files that are not listed |
| # in this variable will be ignored. |
| triage_files = [ |
| "a11y.triage", |
| "audio.triage", |
| "bluetooth.triage", |
| "cpu.triage", |
| "disk.triage", |
| "fonts.triage", |
| "httpsdate_time_source.triage", |
| "intl.dart_aot.triage", |
| "intl.dart_aot_product.triage", |
| "intl.dart_jit.triage", |
| "intl.dart_jit_product.triage", |
| "intl.flutter_aot.triage", |
| "intl.flutter_aot_product.triage", |
| "intl.flutter_jit.triage", |
| "intl.flutter_jit_product.triage", |
| "intl.triage", |
| "memory.triage", |
| "scenic.triage", |
| "sysmem.triage", |
| "timekeeper.triage", |
| "test_manager.triage", |
| "wlan.triage", |
| ] |
| |
| detect_unconditional_files = [ |
| "detect/session-detect.triage", |
| "detect/sysmem-detect.triage", |
| "detect/wlan-detect.triage", |
| ] |
| |
| detect_conditional_files = [ |
| "detect/mali-detect.triage", |
| "detect/omaha-client-detect.triage", |
| "detect/brcmfmac-detect.triage", |
| ] |
| |
| triage_files += detect_unconditional_files + detect_conditional_files |
| |
| # This file will be included in builds that include the |
| # group //src/sys/pkg:omaha-client |
| config_data("omaha-client-detect") { |
| for_pkg = "triage-detect" |
| sources = [ "detect/omaha-client-detect.triage" ] |
| } |
| |
| # This file will be included with the brcmfmac driver versions. See |
| # //src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/BUILD.gn |
| config_data("brcmfmac-detect") { |
| for_pkg = "triage-detect" |
| sources = [ "detect/brcmfmac-detect.triage" ] |
| } |
| |
| # This file will be included in builds that include the |
| # group src/graphics/lib/magma/gnbuild/magma-arm-mali:msd-system |
| config_data_for_assembly("mali-detect") { |
| for_pkg = "triage-detect" |
| sources = [ "detect/mali-detect.triage" ] |
| } |
| |
| # TODO(b/317917028): Delete this target after all dependency is removed. |
| group("amlogic-display-detect") { |
| } |
| |
| group("triage") { |
| testonly = true |
| deps = [ ":tests" ] |
| metadata = { |
| # This metadata key is used by the `triage_sources` build api module |
| # defined in //BUILD.gn. |
| triage_sources = [] |
| foreach(file, triage_files) { |
| triage_sources += [ rebase_path(file, root_build_dir) ] |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":triage_configs_test($host_toolchain)" ] |
| } |
| |
| if (is_host) { |
| triage_config_test("triage_configs_test") { |
| sources = triage_files |
| source_dir = "." |
| } |
| } |