blob: e4faefbac551e3ebc543f504fc46706bba771073 [file] [log] [blame]
# Copyright 2017 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/host.gni")
import("//build/test.gni")
import("//third_party/protobuf/proto_library.gni")
declare_args() {
extra_package_labels = []
}
install_host_tools("host") {
deps = [ "$cobalt_root/src/bin/error_calculator/src:bin" ]
outputs = [ "error_calculator" ]
}
config("cobalt_config") {
include_dirs = [
"$cobalt_root",
"$root_gen_dir/third_party/cobalt",
]
defines = [ "TQ_COBALT_USE_TINK" ]
if (is_fuchsia_tree) {
include_dirs += [
"//sdk/lib/syslog/cpp",
"//sdk/lib/syslog/cpp:backend_legacy",
"//zircon/system/ulib/syslog/include",
]
}
}
group("tests") {
testonly = true
deps = [
"keys:tests",
"src:tests",
]
}
test("cobalt_core_unittests") {
testonly = true
output_name = "cobalt_core_tests"
deps = [
":tests",
"//third_party/boringssl:crypto",
]
if (is_fuchsia_tree) {
deps += [
"//sdk/lib/syslog/cpp:backend_legacy",
"//src/lib/fxl/test:gtest_main",
]
} else {
deps += [ "//third_party/googletest:gtest_main" ]
}
configs -= [ "//build/config:no_exceptions" ]
}
if (is_fuchsia_tree) {
import("//build/components.gni")
fuchsia_unittest_package("cobalt_core_tests") {
deps = [ ":cobalt_core_unittests" ]
manifest = "meta/cobalt_core_tests.cmx"
test_specs = {
log_settings = {
max_severity = "FATAL"
}
}
}
}
testonly = true
group("default") {
deps = [
":cobalt_core_unittests",
"$cobalt_root/src/bin/config_change_validator/src:bin",
"$cobalt_root/src/bin/error_calculator/src:bin",
"$cobalt_root/src/bin/test_app",
]
deps += extra_package_labels
}