| # Copyright 2020 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("tools") { |
| deps = [ ":sysmem-memory-pressure" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":sysmem-memory-pressure-test" ] |
| } |
| |
| source_set("common_srcs") { |
| sources = [ "memory-pressure.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl:fxl_cli", |
| ] |
| } |
| |
| executable("memory-pressure-executable") { |
| output_name = "sysmem-memory-pressure" |
| sources = [ "main.cc" ] |
| deps = [ ":common_srcs" ] |
| } |
| |
| executable("memory-pressure-test-executable") { |
| testonly = true |
| output_name = "sysmem-memory-pressure-test" |
| sources = [ "test.cc" ] |
| |
| deps = [ |
| ":common_srcs", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_shell_package("sysmem-memory-pressure") { |
| deps = [ ":memory-pressure-executable" ] |
| } |
| |
| fuchsia_test_component("memory-pressure-test-component") { |
| component_name = "sysmem-memory-pressure-test" |
| manifest = "meta/sysmem-memory-pressure-test.cml" |
| deps = [ ":memory-pressure-test-executable" ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("sysmem-memory-pressure-test") { |
| test_components = [ ":memory-pressure-test-component" ] |
| } |