blob: 06906a838ba06698ce6f2a9c40c2c2719c863ffc [file] [log] [blame]
# Copyright 2018 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/test_package.gni")
group("tests") {
testonly = true
deps = [
":memory_monitor_inspect_integration_tests",
":memory_monitor_tests",
]
}
executable("memory_monitor_unittests") {
testonly = true
output_name = "memory_monitor_unittests"
sources = [
"high_water_unittest.cc",
"metrics_unittest.cc",
"monitor_fidl_unittest.cc",
"pressure_notifier_unittest.cc",
"pressure_observer_unittest.cc",
]
deps = [
"//garnet/public/lib/gtest",
"//sdk/fidl/fuchsia.boot:fuchsia.boot_c",
"//sdk/fidl/fuchsia.hardware.ram.metrics:fuchsia.hardware.ram.metrics",
"//sdk/lib/inspect/testing/cpp",
"//sdk/lib/sys/cpp/testing:unit",
"//src/cobalt/bin/testing:fake_logger_lib",
"//src/developer/memory/metrics/tests:utils",
"//src/developer/memory/monitor:lib",
"//src/lib/fxl/test:gtest_main",
"//zircon/system/ulib/memfs",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
test_package("memory_monitor_tests") {
deps = [ ":memory_monitor_unittests" ]
tests = [
{
name = "memory_monitor_unittests"
},
]
}
executable("bin-monitor") {
output_name = "memory_monitor_test_app"
sources = [ "monitor_test_app.cc" ]
deps = [
"//sdk/lib/sys/cpp",
"//src/developer/memory/monitor:lib",
"//src/lib/fxl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
executable("test-inspect") {
testonly = true
output_name = "memory_monitor_inspect_integration_tests"
sources = [ "monitor_inspect_test.cc" ]
deps = [
"//sdk/lib/inspect/service/cpp",
"//sdk/lib/inspect/testing/cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//zircon/system/ulib/fs",
"//zircon/system/ulib/inspect",
]
# TODO(fxbug.dev/46756): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
test_package("memory_monitor_inspect_integration_tests") {
deps = [
":bin-monitor",
":test-inspect",
]
binaries = [
{
name = "memory_monitor_test_app"
},
]
meta = [
{
path = rebase_path("meta/memory_monitor_test_app.cmx")
dest = "memory_monitor_test_app.cmx"
},
]
tests = [
{
name = "memory_monitor_inspect_integration_tests"
},
]
}