blob: fdcc68264b2fb8217896e1c8cc67b9d2cf270dd1 [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("//src/sys/core/build/core_shard.gni")
group("tests") {
testonly = true
deps = [ ":driver-playground-tests" ]
}
source_set("lib") {
sources = [
"src/playground.cc",
"src/playground.h",
"src/playground_utils.cc",
"src/playground_utils.h",
]
public_deps = [
"//sdk/fidl/fuchsia.driver.playground:fuchsia.driver.playground_llcpp",
"//src/devices/lib/log",
]
deps = [
"//bundles/drivers:utils",
"//sdk/fidl/fuchsia.process:fuchsia.process_llcpp",
"//sdk/lib/fdio",
"//sdk/lib/fdio:fdio-spawn-actions",
"//zircon/system/ulib/service:service-llcpp",
]
}
executable("bin") {
output_name = "driver_playground"
sources = [ "src/main.cc" ]
deps = [
":lib",
"//sdk/lib/sys/component/llcpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("unit_tests") {
testonly = true
sources = [ "src/tests.cc" ]
deps = [
":lib",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_component("component") {
component_name = "driver_playground"
manifest = "meta/driver_playground.cml"
deps = [ ":bin" ]
}
fuchsia_package("pkg") {
package_name = "driver_playground"
deps = [ ":component" ]
}
core_shard("driver-playground-core-shard") {
shard_file = "meta/driver_playground.core_shard.cml"
}
fuchsia_unittest_package("driver-playground-tests") {
deps = [ ":unit_tests" ]
}