| # Copyright 2020 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":elf-runner-test" ] |
| } |
| |
| rustc_test("elf_runner_test_bin") { |
| name = "elf_runner_test" |
| edition = "2021" |
| source_root = "elf_runner_test.rs" |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//src/sys/lib/component-events", |
| ] |
| |
| sources = [ "elf_runner_test.rs" ] |
| } |
| |
| rustc_binary("args_reporter_bin") { |
| name = "args_reporter" |
| edition = "2021" |
| source_root = "args_reporter.rs" |
| sources = [ "args_reporter.rs" ] |
| } |
| |
| rustc_binary("no_args_reporter_bin") { |
| name = "no_args_reporter" |
| edition = "2021" |
| source_root = "no_args_reporter.rs" |
| sources = [ "no_args_reporter.rs" ] |
| } |
| |
| fuchsia_component("reporter_no_args") { |
| testonly = true |
| deps = [ ":no_args_reporter_bin" ] |
| manifest = "meta/reporter_no_args.cml" |
| } |
| |
| fuchsia_component("reporter_args") { |
| testonly = true |
| deps = [ ":args_reporter_bin" ] |
| manifest = "meta/reporter_args.cml" |
| } |
| |
| fuchsia_unittest_package("elf-runner-test") { |
| manifest = "meta/elf-runner-test.cml" |
| deps = [ |
| ":elf_runner_test_bin", |
| ":reporter_args", |
| ":reporter_no_args", |
| "//src/sys/component_manager:component-manager-realm-builder-debug-cmp", |
| ] |
| } |