blob: b72e296e523b902345abea3fa05958867cc9741b [file] [log] [blame]
# Copyright 2020 The Chromium OS 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("//common-mk/pkg_config.gni")
# Library that provides utilities used by cros_healthd.
pkg_config("libcros_healthd_utils_pkg_deps") {
pkg_deps = [ "libchrome-${libbase_ver}" ]
}
source_set("libcros_healthd_utils") {
configs += [ ":libcros_healthd_utils_pkg_deps" ]
sources = [
"cpu_file_helpers.cc",
"file_utils.cc",
"helper_tool_utils.cc",
"procfs_utils.cc",
]
}
if (use.test) {
pkg_config("libcros_healthd_utils_test_pkg_deps") {
pkg_deps = [
"libchrome-${libbase_ver}",
"libchrome-test-${libbase_ver}",
]
}
executable("libcros_healthd_utils_test") {
configs += [
":libcros_healthd_utils_test_pkg_deps",
"//common-mk:test",
]
deps = [
":libcros_healthd_utils",
"//common-mk/testrunner:testrunner",
"//diagnostics/common:libcommon_test_utils",
]
sources = [
"cpu_file_helpers_test.cc",
"helper_tool_utils_test.cc",
"procfs_utils_test.cc",
]
}
}