blob: 1c3c1c3c9ab9e14de7b8106c0de499e95c9c6aee [file] [log] [blame]
# 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/components.gni")
group("unittests") {
testonly = true
deps = [ ":test_harness_impl_unittest" ]
}
source_set("test_harness_fixture") {
testonly = true
public_configs = [ "//sdk/config" ]
sources = [
"fake_element.cc",
"fake_element.h",
"fake_graphical_presenter.cc",
"fake_graphical_presenter.h",
"fake_module.cc",
"fake_module.h",
"fake_session_shell.cc",
"fake_session_shell.h",
"fake_settings_intl.cc",
"fake_settings_intl.h",
"fake_story_shell.cc",
"fake_story_shell.h",
"launch_counter.cc",
"launch_counter.h",
"test_harness_fixture.cc",
"test_harness_fixture.h",
]
public_deps = [
"//sdk/lib/modular/testing/cpp",
"//sdk/lib/sys/cpp/testing:integration_fixture",
]
deps = [
"//garnet/public/lib/svc/cpp",
"//sdk/fidl/fuchsia.element",
"//sdk/fidl/fuchsia.intl",
"//sdk/fidl/fuchsia.modular.internal",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/fidl/fuchsia.settings",
"//sdk/lib/modular/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl",
"//src/modular/bin/sessionmgr/story_runner:story_runner",
"//src/modular/lib/testing:session_shell_impl",
"//third_party/googletest:gtest",
]
}
executable("test_harness_fixture_test_bin") {
testonly = true
sources = [ "test_harness_fixture_test.cc" ]
deps = [
":test_harness_fixture",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration_fixture",
"//sdk/lib/sys/cpp/testing:unit",
"//src/lib/fsl",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
]
}
fuchsia_unittest_package("test_harness_fixture_test") {
manifest = "meta/test_harness_fixture_test_bin.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 = [
"//sdk/fidl/fuchsia.cobalt",
"//sdk/fidl/fuchsia.devicesettings",
"//sdk/fidl/fuchsia.identity.account",
"//sdk/fidl/fuchsia.modular",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/fidl/fuchsia.settings",
"//sdk/fidl/fuchsia.stash",
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/modular/cpp",
"//sdk/lib/sys/cpp/testing:enclosing_environment",
"//src/lib/fsl",
"//src/modular/lib/lifecycle/cpp",
"//src/modular/lib/modular_config",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
deps = [
"//src/modular/lib/fidl:json_xdr",
"//src/modular/lib/modular_config:json_xdr",
"//src/modular/lib/pseudo_dir:pseudo_dir_utils",
]
}
source_set("test_harness_impl_unittest") {
testonly = true
sources = [ "test_harness_impl_unittest.cc" ]
deps = [
":test_harness_impl",
"//sdk/fidl/fuchsia.modular",
"//sdk/fidl/fuchsia.modular.testing",
"//sdk/lib/sys/cpp/testing:integration_fixture",
"//sdk/lib/sys/cpp/testing:unit",
"//src/lib/fxl/test:gtest_main",
"//src/modular/lib/modular_config",
"//src/modular/lib/pseudo_dir:pseudo_dir_server",
"//zircon/system/ulib/fidl",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}