| # 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") |
| |
| group("all") { |
| testonly = true |
| deps = [ |
| ":calculator-example-cpp", |
| ":calculator-example-rust", |
| ] |
| } |
| |
| # This component combines the calculator_server & client components into one realm |
| # with all necessary routing. |
| fuchsia_component("calculator_realm") { |
| manifest = "realm/meta/realm.cml" |
| } |
| |
| # An input file with commands for the calculator client. |
| resource("input") { |
| sources = [ "input.txt" ] |
| |
| # {{source_file_part}} is something specific to GN. It allows us to get |
| # "input.txt" from "src/input.txt" in a general way. |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_package("calculator-example-rust") { |
| deps = [ |
| ":calculator_realm", |
| ":input", |
| "//examples/fidl/calculator/rust/client:component", |
| "//examples/fidl/calculator/rust/server:component", |
| ] |
| } |
| |
| fuchsia_package("calculator-example-cpp") { |
| deps = [ |
| ":calculator_realm", |
| ":input", |
| "//examples/fidl/calculator/cpp/client:component", |
| "//examples/fidl/calculator/cpp/server:component", |
| ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| deps = [ |
| "cpp:hermetic_tests", |
| "rust:hermetic_tests", |
| ] |
| } |