| # Copyright 2019 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/cpp/sdk_source_set.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/package.gni") |
| import("//build/test/test_package.gni") |
| |
| group("unittests") { |
| testonly = true |
| |
| deps = [ |
| ":test_harness_impl_unittest", |
| ] |
| } |
| |
| # This library has a run-time dependency on the `modular_test_harness` package. |
| sdk_source_set("test_harness_fixture") { |
| testonly = true |
| |
| category = "partner" |
| sdk_name = "modular_testing_cpp" |
| include_base = "//sdk" |
| |
| public_configs = [ "//sdk/config" ] |
| |
| sources = [ |
| "fake_agent.cc", |
| "fake_agent.h", |
| "fake_component.cc", |
| "fake_component.h", |
| "fake_module.cc", |
| "fake_module.h", |
| "fake_session_shell.cc", |
| "fake_session_shell.h", |
| "fake_story_shell.cc", |
| "fake_story_shell.h", |
| "test_harness_fixture.cc", |
| "test_harness_fixture.h", |
| ] |
| |
| deps = [ |
| "//garnet/public/lib/svc/cpp", |
| "//peridot/lib/testing:session_shell_impl", |
| "//sdk/fidl/fuchsia.modular.testing", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//third_party/googletest:gtest", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| fidl("test.modular.test.harness") { |
| sources = [ |
| "test_harness_fixture.test.fidl", |
| ] |
| } |
| |
| executable("test_harness_fixture_test_bin") { |
| testonly = true |
| sources = [ |
| "test_harness_fixture_test.cc", |
| ] |
| deps = [ |
| ":test.modular.test.harness", |
| ":test_harness_fixture", |
| "//garnet/public/lib/fsl", |
| "//sdk/fidl/fuchsia.modular.testing", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| test_package("test_harness_fixture_test") { |
| deprecated_shell = "//build" |
| |
| tests = [ |
| { |
| name = "test_harness_fixture_test_bin" |
| environments = basic_envs |
| }, |
| ] |
| |
| deps = [ |
| ":test_harness_fixture_test_bin", |
| ] |
| } |
| |
| source_set("test_harness_impl") { |
| testonly = true |
| |
| sources = [ |
| "test_harness_impl.cc", |
| "test_harness_impl.h", |
| ] |
| |
| public_deps = [ |
| "//garnet/public/lib/fsl", |
| "//garnet/public/lib/fxl", |
| "//peridot/public/lib/app_driver/cpp:agent_driver", |
| "//sdk/fidl/fuchsia.auth.account", |
| "//sdk/fidl/fuchsia.devicesettings", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.testing", |
| "//sdk/fidl/fuchsia.setui", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/sys/cpp/testing:enclosing_environment", |
| "//zircon/public/lib/async-loop-cpp", |
| ] |
| |
| deps = [ |
| "//peridot/lib/fidl:json_xdr", |
| "//peridot/lib/modular_config:json_xdr", |
| "//peridot/lib/util:pseudo_dir_utils", |
| ] |
| } |
| |
| source_set("test_harness_impl_unittest") { |
| testonly = true |
| |
| sources = [ |
| "test_harness_impl_unittest.cc", |
| ] |
| |
| deps = [ |
| ":test_harness_impl", |
| "//peridot/lib/modular_config", |
| "//peridot/lib/util:pseudo_dir_server", |
| "//sdk/fidl/fuchsia.modular", |
| "//sdk/fidl/fuchsia.modular.testing", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fidl", |
| ] |
| } |