| # 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/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_component.cc", |
| "fake_component.h", |
| "fake_module.cc", |
| "fake_module.h", |
| "test_harness_fixture.cc", |
| "test_harness_fixture.h", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.modular.testing", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//third_party/googletest:gtest", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| executable("test_harness_fixture_test_bin") { |
| testonly = true |
| sources = [ |
| "test_harness_fixture_test.cc", |
| ] |
| deps = [ |
| ":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", |
| "//third_party/googletest:gtest_main", |
| ] |
| } |
| |
| package("test_harness_fixture_test") { |
| testonly = true |
| |
| tests = [ |
| { |
| name = "test_harness_fixture_test_bin" |
| environments = basic_envs |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = "meta/test_harness_fixture_test.cmx" |
| dest = "test_harness_fixture_test.cmx" |
| }, |
| ] |
| |
| 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", |
| "//third_party/googletest:gtest_main", |
| "//zircon/public/lib/fidl", |
| ] |
| } |