| # 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. |
| |
| import("//build/dist/component_manifest_resources.gni") |
| import("//build/test.gni") |
| import("//build/testing/bootfs_test.gni") |
| |
| executable("sysinfo") { |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| output_dir = "$root_out_dir/zircon-migrated" |
| sources = [ |
| "main.cc", |
| "sysinfo.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_llcpp", |
| "//sdk/lib/fdio", |
| "//src/lib/ddk", |
| "//src/sys/lib/stdout-to-debuglog/cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/fs", |
| "//zircon/system/ulib/svc", |
| ] |
| } |
| |
| test("test") { |
| output_name = "sysinfo-test" |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "sysinfo-test.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.sysinfo:fuchsia.sysinfo_llcpp", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| bootfs_test("sysinfo-bootfs-test") { |
| name = "sysinfo-test" |
| environments = basic_envs |
| deps = [ ":test" ] |
| } |
| |
| component_manifest_resources("bootfs") { |
| sources = [ "meta/sysinfo.cml" ] |
| } |