blob: 000201c0a7dd6e2b1a19d82929041e62ffe44699 [file] [log] [blame]
# 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/components.gni")
import("//build/testing/environments.gni")
# For data_filesystem_format
import("//src/storage/fshost/generated_fshost_config.gni")
# This directory contains tests for diagnostic data presence in "core".
#
# Diagnostics data presence tests touch multiple components on the system
# and are non-hermetic.
group("tests") {
testonly = true
deps = [
":archivist-feedback-health-tests",
":archivist-pipeline-metrics-tests",
":archivist-sampler-metrics-tests",
":component-manager-cpu-stats-tests",
":component-manager-status-tests",
":diagnostics-kcounter-inspect-tests",
":diagnostics-persistence-inspect-tests",
":fshost-metrics-tests",
":legacy-metrics-tests",
":log_settings_min_severity",
":netstack-feedback-inspect-tests",
":netstack-inspect-tests",
]
if (!fxfs_blob) {
deps += [ ":fshost-blobfs-metrics-tests" ]
}
if (data_filesystem_format == "fxfs") {
deps += [ ":fshost-fxfs-metrics-tests" ]
}
if (data_filesystem_format == "minfs") {
deps += [ ":fshost-minfs-metrics-tests" ]
}
}
fuchsia_unittest_package("fshost-metrics-tests") {
manifest = "meta/fshost_metrics_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("fshost-blobfs-metrics-tests") {
manifest = "meta/fshost_blobfs_metrics_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("fshost-fxfs-metrics-tests") {
manifest = "meta/fshost_fxfs_metrics_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("fshost-minfs-metrics-tests") {
manifest = "meta/fshost_minfs_metrics_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("component-manager-status-tests") {
manifest = "meta/component_manager_status_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("component-manager-cpu-stats-tests") {
manifest = "meta/component_manager_cpu_stats_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("archivist-feedback-health-tests") {
manifest = "meta/archivist_feedback_health_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("archivist-pipeline-metrics-tests") {
manifest = "meta/archivist_pipeline_metrics_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("archivist-sampler-metrics-tests") {
manifest = "meta/archivist_sampler_metrics_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("legacy-metrics-tests") {
manifest = "meta/legacy_metrics_tests.cml"
test_specs = {
environments = [
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("diagnostics-kcounter-inspect-tests") {
manifest = "meta/diagnostics_kcounter_inspect_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("diagnostics-persistence-inspect-tests") {
manifest = "meta/persistence_tests.cml"
test_specs = {
environments = [
emu_env,
{
dimensions = {
device_type = "Astro"
}
},
]
}
}
fuchsia_unittest_package("netstack-inspect-tests") {
manifest = "meta/netstack_tests.cml"
test_specs = {
environments = all_fuchsia_envs
}
}
fuchsia_unittest_package("netstack-feedback-inspect-tests") {
manifest = "meta/netstack_feedback_tests.cml"
test_specs = {
environments = [
emu_env,
astro_env,
]
}
}
rustc_test("log_settings_min_severity_bin") {
edition = "2021"
source_root = "src/log_settings_min_severity.rs"
sources = [ source_root ]
deps = [
"//src/lib/diagnostics/reader/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
}
fuchsia_unittest_package("log_settings_min_severity") {
manifest = "meta/log_settings_min_severity.cml"
deps = [ ":log_settings_min_severity_bin" ]
# This test expects to observe its own TRACE-level log messages but does not configure that as
# the static severity level in the binary. The test relies on the configuration below to pass.
test_specs = {
log_settings = {
min_severity = "TRACE"
}
}
}