mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 07:14:10 +08:00
48ee086ca4
In the Fuchsia tree, tests can now be run via `fx run-test crashpad_test`. Bug: crashpad:196 Change-Id: I427cde7090b00b46c9d6a948664701f98b014e9d Reviewed-on: https://chromium-review.googlesource.com/c/1481811 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Francois Rousseau <frousseau@google.com>
176 lines
4.1 KiB
Plaintext
176 lines
4.1 KiB
Plaintext
# Copyright 2017 The Crashpad Authors. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import("build/crashpad_buildconfig.gni")
|
|
import("build/test.gni")
|
|
import("util/net/tls.gni")
|
|
|
|
config("crashpad_config") {
|
|
include_dirs = [ "." ]
|
|
}
|
|
|
|
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
|
|
test("crashpad_tests") {
|
|
deps = [
|
|
"client:client_test",
|
|
"handler:handler_test",
|
|
"minidump:minidump_test",
|
|
"snapshot:snapshot_test",
|
|
"test:gmock_main",
|
|
"test:test_test",
|
|
"util:util_test",
|
|
]
|
|
}
|
|
|
|
if (crashpad_is_in_fuchsia) {
|
|
import("//build/package.gni")
|
|
package("crashpad_test") {
|
|
testonly = true
|
|
|
|
deps = [
|
|
":crashpad_tests",
|
|
"snapshot:crashpad_snapshot_test_both_dt_hash_styles",
|
|
"snapshot:crashpad_snapshot_test_module",
|
|
"snapshot:crashpad_snapshot_test_module_large",
|
|
"snapshot:crashpad_snapshot_test_module_small",
|
|
"test:crashpad_test_test_multiprocess_exec_test_child",
|
|
"util:http_transport_test_server",
|
|
]
|
|
|
|
tests = [
|
|
{
|
|
name = "crashpad_tests"
|
|
},
|
|
]
|
|
|
|
meta = [
|
|
{
|
|
path = "test/fuchsia_crashpad_tests.cmx"
|
|
dest = "crashpad_tests.cmx"
|
|
}
|
|
]
|
|
|
|
binaries = [
|
|
{
|
|
name = "crashpad_test_test_multiprocess_exec_test_child"
|
|
dest = "crashpad_test_test_multiprocess_exec_test_child"
|
|
},
|
|
{
|
|
name = "http_transport_test_server"
|
|
dest = "http_transport_test_server"
|
|
},
|
|
]
|
|
|
|
loadable_modules = [
|
|
{
|
|
name = "crashpad_snapshot_test_both_dt_hash_styles.so"
|
|
},
|
|
{
|
|
name = "crashpad_snapshot_test_module.so"
|
|
},
|
|
{
|
|
name = "crashpad_snapshot_test_module_large.so"
|
|
},
|
|
{
|
|
name = "crashpad_snapshot_test_module_small.so"
|
|
},
|
|
]
|
|
|
|
resources = [
|
|
{
|
|
path = "util/net/testdata/ascii_http_body.txt"
|
|
dest = "util/net/testdata/ascii_http_body.txt"
|
|
},
|
|
{
|
|
path = "util/net/testdata/binary_http_body.dat"
|
|
dest = "util/net/testdata/binary_http_body.dat"
|
|
},
|
|
{
|
|
path = "test/test_paths_test_data_root.txt"
|
|
dest = "test/test_paths_test_data_root.txt"
|
|
},
|
|
]
|
|
|
|
if (crashpad_use_boringssl_for_http_transport_socket) {
|
|
deps += [ "util:generate_test_server_key" ]
|
|
resources += [
|
|
{
|
|
path = "$root_out_dir/crashpad_util_test_cert.pem"
|
|
dest = "crashpad_util_test_cert.pem"
|
|
},
|
|
{
|
|
path = "$root_out_dir/crashpad_util_test_key.pem"
|
|
dest = "crashpad_util_test_key.pem"
|
|
},
|
|
]
|
|
}
|
|
}
|
|
|
|
package("crashpad_database_util") {
|
|
deps = [
|
|
"tools:crashpad_database_util",
|
|
]
|
|
|
|
binaries = [
|
|
{
|
|
name = "crashpad_database_util"
|
|
shell = true
|
|
},
|
|
]
|
|
}
|
|
}
|
|
} else if (crashpad_is_standalone) {
|
|
test("crashpad_client_test") {
|
|
deps = [
|
|
"client:client_test",
|
|
"test:gmock_main",
|
|
]
|
|
}
|
|
|
|
test("crashpad_handler_test") {
|
|
deps = [
|
|
"handler:handler_test",
|
|
"test:gtest_main",
|
|
]
|
|
}
|
|
|
|
test("crashpad_minidump_test") {
|
|
deps = [
|
|
"minidump:minidump_test",
|
|
"test:gtest_main",
|
|
]
|
|
}
|
|
|
|
test("crashpad_snapshot_test") {
|
|
deps = [
|
|
"snapshot:snapshot_test",
|
|
"test:gtest_main",
|
|
]
|
|
}
|
|
|
|
test("crashpad_test_test") {
|
|
deps = [
|
|
"test:gmock_main",
|
|
"test:test_test",
|
|
]
|
|
}
|
|
|
|
test("crashpad_util_test") {
|
|
deps = [
|
|
"test:gmock_main",
|
|
"util:util_test",
|
|
]
|
|
}
|
|
}
|