| # 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/test.gni") | 
 | import("//tools/cmc/build/expect_includes.gni") | 
 |  | 
 | group("platform") { | 
 |   testonly = true | 
 |   deps = [ | 
 |     ":client_includes", | 
 |     ":platform_component", | 
 |     "//sdk/lib/driver_test_realm:static", | 
 |     "//src/devices/bus/drivers/platform", | 
 |   ] | 
 | } | 
 |  | 
 | group("tests") { | 
 |   testonly = true | 
 |   deps = [ ":platform_driver_test_realm_test" ] | 
 | } | 
 |  | 
 | expect_includes("client_includes") { | 
 |   includes = [ "meta/client.shard.cml" ] | 
 | } | 
 |  | 
 | executable("bin") { | 
 |   testonly = true | 
 |   output_name = "platform_driver_test_realm" | 
 |   sources = [ "platform.cc" ] | 
 |   deps = [ | 
 |     "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_cpp", | 
 |     "//sdk/lib/component/incoming/cpp", | 
 |     "//sdk/lib/syslog/cpp", | 
 |   ] | 
 |  | 
 |   # TODO(https://fxbug.dev/42176699): This target uses mutable tables which are deprecated, | 
 |   # rather than builders. | 
 |   configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ] | 
 | } | 
 |  | 
 | fuchsia_component("platform_component") { | 
 |   testonly = true | 
 |   component_name = "platform_driver_test_realm" | 
 |   manifest = "meta/platform_driver_test_realm.cml" | 
 |   deps = [ ":bin" ] | 
 | } | 
 |  | 
 | test("test") { | 
 |   output_name = "platform_driver_test_realm_test" | 
 |   sources = [ "test.cc" ] | 
 |   deps = [ | 
 |     "//sdk/lib/device-watcher/cpp", | 
 |     "//sdk/lib/driver_test_realm/platform", | 
 |     "//src/lib/fxl/test:gtest_main", | 
 |     "//zircon/system/ulib/fbl", | 
 |   ] | 
 | } | 
 |  | 
 | fuchsia_unittest_package("platform_driver_test_realm_test") { | 
 |   deps = [ ":test" ] | 
 | } |