blob: 1cb7d50be87ca7cacace8c6eaf833d9bb056f51d [file] [log] [blame]
# 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/test/test_package.gni")
###############################################################################
# GROUPS
###############################################################################
group("tests") {
testonly = true
public_deps = [ ":feedback_utils_tests" ]
}
###############################################################################
# PACKAGES
###############################################################################
test_package("feedback_utils_tests") {
tests = [
{
name = "archive_unittest"
},
{
name = "cobalt_unittest"
},
{
name = "rotating_file_set_unittest"
},
{
name = "write_only_file_unittest"
},
{
name = "inspect_node_manager_unittest"
},
{
name = "log_format_unittest"
},
{
name = "promise_unittest"
},
{
name = "time_unittest"
},
{
name = "utc_time_provider_unittest"
},
]
resources = [
# needed for archive_unittest
{
path = "resources/test_data.zip"
dest = "test_data.zip"
},
]
deps = [
":archive_unittest",
":cobalt_unittest",
":inspect_node_manager_unittest",
":log_format_unittest",
":promise_unittest",
":rotating_file_set_unittest",
":time_unittest",
":utc_time_provider_unittest",
":write_only_file_unittest",
]
}
###############################################################################
# EXECUTABLES
###############################################################################
executable("archive_unittest") {
testonly = true
sources = [ "archive_unittest.cc" ]
deps = [
"//sdk/fidl/fuchsia.feedback",
"//src/developer/feedback/testing:gmatchers",
"//src/developer/feedback/testing:gpretty_printers",
"//src/developer/feedback/testing:gtest_with_syslog_main",
"//src/developer/feedback/utils:archive",
"//src/lib/fsl",
"//src/lib/fxl",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/system/fidl/fuchsia-mem",
]
# TODO(46561): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
executable("cobalt_unittest") {
testonly = true
sources = [ "cobalt_unittest.cc" ]
deps = [
"//garnet/public/lib/timekeeper:testing",
"//src/developer/feedback/testing:cobalt_test_fixture",
"//src/developer/feedback/testing:gpretty_printers",
"//src/developer/feedback/testing:gtest_with_syslog_main",
"//src/developer/feedback/testing:unit_test_fixture",
"//src/developer/feedback/testing/stubs:stub_cobalt_logger_factory",
"//src/developer/feedback/utils:cobalt",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/public/lib/zx",
]
}
executable("inspect_node_manager_unittest") {
testonly = true
sources = [ "inspect_node_manager_unittest.cc" ]
deps = [
"//sdk/lib/inspect/testing/cpp",
"//src/developer/feedback/testing:gtest_with_syslog_main",
"//src/developer/feedback/utils:inspect_node_manager",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
}
executable("log_format_unittest") {
testonly = true
sources = [ "log_format_unittest.cc" ]
deps = [
"//src/developer/feedback/utils:logs",
"//src/lib/fxl/test:gtest_main",
"//src/lib/syslog/cpp",
"//third_party/googletest:gtest",
]
}
executable("promise_unittest") {
testonly = true
sources = [ "promise_unittest.cc" ]
deps = [
"//garnet/public/lib/gtest",
"//src/developer/feedback/testing:gtest_with_syslog_main",
"//src/developer/feedback/utils:promise",
"//src/lib/fxl",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/public/lib/async-cpp",
]
}
executable("rotating_file_set_unittest") {
testonly = true
sources = [ "rotating_file_set_unittest.cc" ]
deps = [
"//src/developer/feedback/utils:files",
"//src/lib/files",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
# TODO(46561): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}
executable("time_unittest") {
testonly = true
sources = [ "time_unittest.cc" ]
deps = [
"//src/developer/feedback/utils:time",
"//src/lib/fxl/test:gtest_main",
"//src/lib/timekeeper:testing",
"//third_party/googletest:gtest",
]
}
executable("utc_time_provider_unittest") {
testonly = true
sources = [
"stub_utc.cc",
"stub_utc.h",
"utc_time_provider_unittest.cc",
]
deps = [
"//garnet/public/lib/timekeeper:testing",
"//src/developer/feedback/testing:gtest_with_syslog_main",
"//src/developer/feedback/testing:unit_test_fixture",
"//src/developer/feedback/utils:utc_time_provider",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
}
executable("write_only_file_unittest") {
testonly = true
sources = [ "write_only_file_unittest.cc" ]
deps = [
"//src/developer/feedback/utils:files",
"//src/lib/files",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
# TODO(46561): Fix the leaks and remove this.
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
}