| # 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/assembly/bootfs_files_for_assembly.gni") |
| import("//build/components.gni") |
| import("//build/test.gni") |
| |
| source_set("lib") { |
| sources = [ "ram-info.cc" ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.hardware.ram.metrics:fuchsia.hardware.ram.metrics_cpp", |
| "//zircon/system/ulib/zx", |
| ] |
| deps = [ |
| "//sdk/lib/component/incoming/cpp", |
| "//src/devices/lib/amlogic", |
| ] |
| } |
| |
| executable("ram-info") { |
| visibility = [ ":*" ] |
| sources = [ "main.cc" ] |
| deps = [ |
| ":lib", |
| "//build/validate:non_production_tag", |
| "//sdk/lib/component/incoming/cpp", |
| ] |
| } |
| |
| bootfs_files_for_assembly("bootfs") { |
| deps = [ ":ram-info" ] |
| } |
| |
| test("ram-info-test-bin") { |
| output_name = "ram-info-test" |
| sources = [ "ram-info-test.cc" ] |
| deps = [ |
| ":lib", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("ram-info-test") { |
| deps = [ ":ram-info-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ram-info-test" ] |
| } |