blob: 3d5d0e651adf2675d43ce5f3fa23644ac6685b54 [file] [log] [blame]
# Copyright 2018 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")
import("//build/testing/environments.gni")
group("tests") {
testonly = true
deps = [
":config_unittest",
":crasher_exe",
":crashpad_agent_integration_test",
":crashpad_agent_tests",
":crashpad_agent_unittest",
]
}
test_package("crashpad_agent_tests") {
tests = [
{
name = "config_unittest"
environments = basic_envs
},
{
name = "crashpad_agent_unittest"
environments = basic_envs
},
{
name = "crashpad_agent_integration_test"
environments = basic_envs
},
]
binaries = [
# needed for crashpad_agent_impl_unittest
{
name = "crasher_exe"
},
]
resources = [
# needed for config_unittest
{
path = "configs/valid_no_upload.json"
dest = "valid_config_no_upload.json"
},
# needed for config_unittest
{
path = "configs/valid_upload.json"
dest = "valid_config_upload.json"
},
# needed for config_unittest
{
path = "configs/valid_no_upload_spurious_server.json"
dest = "valid_config_no_upload_spurious_server.json"
},
# needed for config_unittest
{
path = "configs/bad_schema_spurious_field.json"
dest = "bad_schema_spurious_field_config.json"
},
# needed for config_unittest
{
path = "configs/bad_schema_missing_required_field.json"
dest = "bad_schema_missing_required_field_config.json"
},
# needed for config_unittest
{
path = "configs/bad_schema_missing_server.json"
dest = "bad_schema_missing_server_config.json"
},
]
deps = [
":config_unittest",
":crasher_exe",
":crashpad_agent_integration_test",
":crashpad_agent_unittest",
]
}
executable("config_unittest") {
testonly = true
sources = [
"config_unittest.cc",
]
deps = [
"//garnet/public/lib/syslog/cpp",
"//src/developer/crashpad_agent:src",
"//third_party/googletest:gtest_main",
]
}
executable("crasher_exe") {
testonly = true
sources = [
"crasher_exe.cc",
]
}
executable("crashpad_agent_unittest") {
testonly = true
sources = [
"crashpad_agent_unittest.cc",
]
deps = [
"//garnet/public/lib/fsl",
"//garnet/public/lib/gtest",
"//garnet/public/lib/syslog/cpp",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp/testing:unit",
"//src/developer/crashpad_agent:src",
"//src/lib/fxl",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest_main",
"//zircon/public/fidl/fuchsia-crash",
"//zircon/public/fidl/fuchsia-mem",
"//zircon/public/lib/async",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/zx",
]
}
executable("crashpad_agent_integration_test") {
testonly = true
sources = [
"crashpad_agent_integration_test.cc",
]
deps = [
"//garnet/public/lib/component/cpp/testing",
"//garnet/public/lib/fsl",
"//garnet/public/lib/gtest",
"//garnet/public/lib/syslog/cpp",
"//sdk/lib/sys/cpp",
"//third_party/googletest:gtest_main",
"//zircon/public/fidl/fuchsia-crash",
"//zircon/public/fidl/fuchsia-mem",
"//zircon/public/lib/zx",
]
}