| # 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/cpp/sdk_source_set.gni") |
| import("//build/test.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":procfs-cpp-tests" ] |
| } |
| |
| sdk_source_set("cpp") { |
| category = "internal" |
| |
| sdk_name = "procfs_cpp" |
| |
| include_base = "//sdk" |
| sources = [ |
| "internal/cwd.cc", |
| "internal/cwd.h", |
| "internal/environ.cc", |
| "internal/environ.h", |
| "process.cc", |
| "process.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/lib/fdio", |
| "//sdk/lib/vfs/cpp", |
| ] |
| |
| public_configs = [ "//sdk/config" ] |
| } |
| |
| test("procfs_cpp_unittests") { |
| sources = [ "process_unittest.cc" ] |
| |
| deps = [ |
| ":cpp", |
| "//sdk/lib/fdio", |
| "//src/lib/files", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| ] |
| } |
| |
| test_package("procfs-cpp-tests") { |
| deps = [ ":procfs_cpp_unittests" ] |
| |
| tests = [ |
| { |
| name = "procfs_cpp_unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |