blob: d80e5677c7ffbae1a448c66ee40c73b3326a6a4c [file] [log] [blame]
# Copyright 2017 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/test.gni")
group("testing") {
testonly = true
deps = [
":get_ledger",
":ledger_instance_factory",
":lib",
":run_all_unittests",
":unittests",
"ledger_test_instance_provider",
]
}
visibility = [ "//src/ledger/*" ]
source_set("lib") {
testonly = true
sources = [
"blocking_callback_waiter.cc",
"blocking_callback_waiter.h",
"data_generator.cc",
"data_generator.h",
"fake_disk_cleanup_manager.h",
"get_page_ensure_initialized.cc",
"get_page_ensure_initialized.h",
"ledger_matcher.cc",
"ledger_matcher.h",
"loop_controller.h",
"loop_controller_real_loop.cc",
"loop_controller_real_loop.h",
"loop_controller_test_loop.cc",
"loop_controller_test_loop.h",
"page_data_generator.cc",
"page_data_generator.h",
"quit_on_error.cc",
"quit_on_error.h",
"run_in_coroutine.cc",
"run_in_coroutine.h",
"run_with_tracing.cc",
"run_with_tracing.h",
"test_with_environment.cc",
"test_with_environment.h",
]
public_deps = [
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp/testing:unit",
"//src/ledger/bin/app:flags",
"//src/ledger/bin/app:lib",
"//src/ledger/bin/environment",
"//src/ledger/bin/environment:test_loop_notification",
"//src/ledger/bin/fidl/include",
"//src/ledger/bin/public",
"//src/ledger/bin/storage/public:public",
"//src/ledger/fidl/fuchsia.ledger",
"//src/ledger/fidl/fuchsia.ledger.cloud",
"//src/ledger/lib/convert",
"//src/ledger/lib/loop_fixture",
"//src/ledger/lib/rng:testing",
"//src/ledger/lib/timekeeper:testing",
"//src/ledger/lib/vmo",
"//third_party/abseil-cpp",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-testing",
"//zircon/public/lib/fit",
"//zircon/public/lib/trace-provider-so",
"//zircon/public/lib/zx",
]
deps = [
"//src/ledger/fidl/fuchsia.ledger.internal",
"//src/ledger/lib/callback",
"//src/ledger/lib/coroutine",
"//src/ledger/lib/logging",
"//src/ledger/lib/vmo",
"//third_party/abseil-cpp",
"//third_party/boringssl",
"//zircon/public/lib/async-cpp",
]
configs += [ "//src/ledger:ledger_config" ]
}
source_set("ledger_instance_factory") {
testonly = true
sources = [
"ledger_app_instance_factory.cc",
"ledger_app_instance_factory.h",
]
public_deps = [
":lib",
"//src/ledger/bin/fidl/include",
"//src/ledger/bin/fidl_helpers",
"//src/ledger/fidl/fuchsia.ledger",
"//src/ledger/fidl/fuchsia.ledger.internal",
"//third_party/abseil-cpp",
]
deps = [
"//src/ledger/lib/callback",
"//src/ledger/lib/convert",
"//src/ledger/lib/vmo",
"//third_party/googletest:gtest",
]
configs += [ "//src/ledger:ledger_config" ]
}
# TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=12144): Consider
# moving to benchmarks/.
source_set("get_ledger") {
testonly = true
sources = [
"get_ledger.cc",
"get_ledger.h",
]
public_deps = [
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//src/ledger/bin/app:flags",
"//src/ledger/bin/fidl/include",
"//src/ledger/bin/platform",
"//src/ledger/bin/public",
"//src/ledger/fidl/fuchsia.ledger",
"//src/ledger/fidl/fuchsia.ledger.cloud",
"//src/ledger/lib/convert",
"//src/ledger/lib/files",
"//src/ledger/lib/vmo",
"//third_party/abseil-cpp",
"//zircon/public/lib/fit",
]
deps = [
"//src/ledger/fidl/fuchsia.ledger.internal",
"//src/ledger/lib/callback",
"//src/ledger/lib/logging",
]
configs += [ "//src/ledger:ledger_config" ]
}
source_set("run_trace") {
testonly = true
sources = [
"run_trace.cc",
"run_trace.h",
]
public_deps = [
"//sdk/fidl/fuchsia.sys",
"//sdk/lib/sys/cpp",
]
deps = [
"//src/ledger/lib/logging",
"//third_party/abseil-cpp",
"//zircon/public/lib/fdio",
"//zircon/public/lib/zx",
]
}
source_set("unittests") {
testonly = true
sources = [
"blocking_callback_waiter_unittest.cc",
"ledger_matcher_unittest.cc",
"test_with_environment_unittest.cc",
]
deps = [
":get_ledger",
":ledger_instance_factory",
":lib",
":run_trace",
"//src/ledger/bin/app:flags",
"//src/ledger/lib/callback",
"//src/ledger/lib/logging",
"//third_party/abseil-cpp",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
]
configs += [ "//src/ledger:ledger_config" ]
}
source_set("run_all_unittests") {
testonly = true
sources = [
"run_all_unittests.cc",
"run_all_unittests.h",
]
deps = [
"//src/ledger/lib/logging",
"//third_party/abseil-cpp",
"//third_party/googletest:gtest",
]
configs += [ "//src/ledger:ledger_config" ]
}
source_set("gtest_main") {
testonly = true
sources = [ "run_all_unittests_main.cc" ]
deps = [ ":run_all_unittests" ]
configs += [ "//src/ledger:ledger_config" ]
}
test("run_all_unittests_test") {
testonly = true
sources = [ "run_all_unittests_test.cc" ]
deps = [
":run_all_unittests",
"//src/ledger/lib/logging",
"//third_party/abseil-cpp",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-testing",
]
configs += [ "//src/ledger:ledger_config" ]
}