blob: d79f8464ee5de5b79f1016c703c2e9a32dfa86dd [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",
]
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
deps = [
"//sdk/fidl/fuchsia.boot:fuchsia.boot_c",
"//sdk/fidl/fuchsia.debugdata:fuchsia.debugdata_c",
"//sdk/fidl/fuchsia.io:fuchsia.io_c",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp_wire",
"//sdk/lib/fdio",
"//sdk/lib/stdcompat",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("app") {
sources = [ "main.cc" ]
deps = [
":coverage-source",
"//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp_wire",
"//sdk/lib/fidl/cpp",
"//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/fidl/fuchsia.boot:fuchsia.boot_cpp_wire",
"//sdk/fidl/fuchsia.debugdata:fuchsia.debugdata_cpp_wire",
"//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" ]
}