blob: ef284cb278bfa269da6c3b3f86a14d71a5f50eed [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.
visibility = [ "//src/ledger/*" ]
source_set("platform") {
sources = [
"fd.cc",
"fd.h",
"ledger_memory_estimator.h",
"platform.h",
"scoped_tmp_location.h",
]
public_deps = [
"//src/ledger/lib/files",
"//third_party/abseil-cpp",
"//third_party/leveldb",
]
configs += [ "//src/ledger:ledger_config" ]
}
# Fuchsia implementation of platform.
source_set("implementation") {
sources = [
"fuchsia_ledger_memory_estimator.cc",
"fuchsia_ledger_memory_estimator.h",
"fuchsia_platform.cc",
"fuchsia_platform.h",
"fuchsia_scoped_tmp_location.cc",
"fuchsia_scoped_tmp_location.h",
]
public_deps = [
":platform",
"//src/ledger/lib/convert",
"//src/ledger/lib/files",
"//src/ledger/lib/logging",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/async-loop-default",
"//zircon/public/lib/memfs",
"//zircon/public/lib/trace-engine",
]
configs += [ "//src/ledger:ledger_config" ]
}
source_set("unittests") {
testonly = true
sources = [ "platform_unittest.cc" ]
deps = [
":implementation",
":platform",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
configs += [ "//src/ledger:ledger_config" ]
}
# Unittests for the Fuchsia implementation of platform.
source_set("implementation_unittests") {
testonly = true
sources = [
"fuchsia_ledger_memory_estimator_unittest.cc",
"fuchsia_platform_unittest.cc",
"fuchsia_scoped_tmp_location_unittest.cc",
"platform_unittest.cc",
]
deps = [
":implementation",
"//src/ledger/bin/testing:get_ledger",
"//src/ledger/bin/testing:run_trace",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
configs += [ "//src/ledger:ledger_config" ]
}