blob: a96ffb1f1fb9b013f0ecce3138a117131c5d3afd [file] [log] [blame]
# Copyright 2022 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/test.gni")
group("tests") {
testonly = true
deps = [ ":early-boot-instrumentation-tests" ]
}
source_set("coverage-source") {
sources = [ "coverage_source.cc" ]
public = [ "coverage_source.h" ]
public_deps = [
"//sdk/lib/vfs/cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxc",
]
deps = [
"//sdk/lib/fdio",
"//sdk/lib/stdcompat",
]
}
executable("app") {
sources = [ "main.cc" ]
deps = [
":coverage-source",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
]
}
test("coverage-source-test") {
testonly = true
sources = [ "coverage_source_test.cc" ]
deps = [
":coverage-source",
"//sdk/lib/fdio",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_unittest_component("coverage-source-tests") {
deps = [ ":coverage-source-test" ]
}
fuchsia_test_component(
"early-boot-instrumentation-integration-test-component") {
component_name = "early-boot-instrumentation-integration-test"
manifest = "meta/early_boot_instrumentation_test.cml"
deps = [ ":early-boot-instrumentation-integration-test" ]
}
test("early-boot-instrumentation-integration-test") {
output_name = "early-boot-instrumentation-integration-test"
sources = [ "early_boot_instrumentation_test.cc" ]
deps = [
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/system/ulib/fbl",
]
}
fuchsia_test_package("early-boot-instrumentation-tests") {
test_components = [
":coverage-source-tests",
":early-boot-instrumentation-integration-test-component",
]
deps = [
# Needed by end to end test to provide fake raw instrumentation sources.
":early-boot-instrumentation",
"test:early-boot-instrumentation-provider",
]
}
fuchsia_component("early-boot-instrumentation") {
manifest = "meta/early_boot_instrumentation.cml"
deps = [ ":app" ]
}
fuchsia_package("early-boot-instrumentation-pkg") {
package_name = "early-boot-instrumentation"
deps = [ ":early-boot-instrumentation" ]
}