blob: 5e06bd93fa7f9cab8fc085cc674ce6eb56f98528 [file] [log] [blame]
# 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("//src/sys/build/components.gni")
import("//src/sys/build/fuchsia_test_package.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_llcpp",
"//sdk/lib/fdio",
"//src/lib/fsl",
"//src/lib/fxl",
]
}
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/public/lib/fbl",
]
}
fuchsia_component("memory-pressure") {
component_name = "sysmem-memory-pressure"
manifest = "meta/sysmem-memory-pressure.cmx"
deps = [ ":memory-pressure-executable" ]
}
fuchsia_package("sysmem-memory-pressure") {
deps = [ ":memory-pressure" ]
}
fuchsia_component("memory-pressure-test-component") {
testonly = true
component_name = "sysmem-memory-pressure-test"
manifest = "meta/sysmem-memory-pressure-test.cmx"
deps = [ ":memory-pressure-test-executable" ]
}
fuchsia_test_package("sysmem-memory-pressure-test") {
test_components = [ ":memory-pressure-test-component" ]
}