blob: fd6d713ad5e5d50c8c60f589398232a12e5e3cf2 [file] [log] [blame]
# 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/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",
"crashes.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",
"stash.triage",
"stash_secure.triage",
"sysmem.triage",
"timekeeper.triage",
"timezone.triage",
]
detect_unconditional_files = [
"detect/sysmem-detect.triage",
"detect/wlan-detect.triage",
]
detect_conditional_files = [
"detect/amlogic-display-detect.triage",
"detect/mali-detect.triage",
"detect/omaha-client-detect.triage",
"detect/brcmfmac-detect.triage",
]
triage_files += detect_unconditional_files + detect_conditional_files
config_data("triage-detect") {
for_pkg = "triage-detect"
sources = detect_unconditional_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("mali-detect") {
for_pkg = "triage-detect"
sources = [ "detect/mali-detect.triage" ]
}
# This file will be included in builds that include the
# //src/graphics/display/drivers/amlogic-display driver
# target
config_data("amlogic-display-detect") {
for_pkg = "triage-detect"
sources = [ "detect/amlogic-display-detect.triage" ]
}
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)" ]
}
triage_config_test("triage_configs_test") {
sources = triage_files
source_dir = "."
}