| # 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/rust/rustc_test.gni") |
| |
| rustc_test("tests_bin") { |
| edition = "2021" |
| source_root = "tests.rs" |
| name = "gunit_runner_integration_test" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", |
| "//src/lib/fuchsia-async", |
| "//src/sys/test_manager:test_lib", |
| "//src/sys/test_runners:test_lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:pretty_assertions", |
| ] |
| |
| sources = [ "tests.rs" ] |
| |
| inputs = [ |
| "//src/sys/test_runners/gtest/test_data/sample_tests_golden_events.rsf", |
| ] |
| } |
| |
| fuchsia_test_component("gunit_runner_integration_test") { |
| manifest = "meta/gunit_runner_integration_test.cml" |
| deps = [ ":tests_bin" ] |
| test_type = "test_arch" |
| } |
| |
| fuchsia_test_package("gunit-runner-integration-test") { |
| test_components = [ ":gunit_runner_integration_test" ] |
| subpackages = [ "//src/sys/test_manager:pkg" ] |
| } |
| |
| fuchsia_component("empty_test_component") { |
| testonly = true |
| manifest = "meta/empty_test.cml" |
| component_name = "empty_test" |
| deps = [ "//src/sys/test_runners/gtest/test_data/:gunit_runner_no_tests" ] |
| } |
| |
| fuchsia_component("gunit_runner_sample_tests_component") { |
| testonly = true |
| manifest = "meta/sample_tests.cml" |
| component_name = "sample_tests" |
| deps = [ "//src/sys/test_runners/gtest/test_data/:gunit_runner_sample_tests" ] |
| } |
| |
| fuchsia_component("gunit_runner_test_with_custom_args_component") { |
| testonly = true |
| manifest = "meta/test_with_custom_args.cml" |
| component_name = "test_with_custom_args" |
| deps = [ "//src/sys/test_runners/gtest/test_data/:gunit_runner_test_with_custom_args" ] |
| } |
| |
| fuchsia_component("gunit_runner_test_with_environ_component") { |
| testonly = true |
| manifest = "meta/test_with_environ.cml" |
| component_name = "test_with_environ" |
| deps = [ |
| "//src/sys/test_runners/gtest/test_data/:gunit_runner_test_with_environ", |
| ] |
| } |
| |
| fuchsia_package("gunit-runner-example-tests") { |
| testonly = true |
| deps = [ |
| ":empty_test_component", |
| ":gunit_runner_sample_tests_component", |
| ":gunit_runner_test_with_custom_args_component", |
| ":gunit_runner_test_with_environ_component", |
| ] |
| } |
| |
| executable("gunit_simple_test") { |
| testonly = true |
| sources = [ "simple_test.cc" ] |
| deps = [ "//src/sys/test_runners/gtest/test_data:gunit_main" ] |
| } |
| |
| fuchsia_component("simple_test_component") { |
| testonly = true |
| manifest = "meta/simple_test.cml" |
| component_name = "simple_test" |
| deps = [ ":gunit_simple_test" ] |
| } |
| |
| fuchsia_test_package("gunit-runner-smoke-test") { |
| test_components = [ ":simple_test_component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":gunit-runner-example-tests", |
| ":gunit-runner-integration-test", |
| ":gunit-runner-smoke-test", |
| ] |
| } |