mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
gn: Refactor build files to avoid build/secondary
In doing standalone bringup of Crashpad targeting Fuchsia, it seemed tidy to keep the same literal paths to the dependencies that Chromium needed and add stubs/forwarding to build/secondary in the Crashpad tree as required to make those work. However, when trying to build Crashpad in the Fuchsia tree itself, that would require adding forwarding files to the Fuchsia tree to match the Chromium directory structure, which would be awkward. Instead, have explicit dependencies in the Crashpad tree that select the locations for various dependencies. Bug: crashpad:79, crashpad:196 Change-Id: Ib506839f9c97d8ef823663cdc733cbdcfa126139 Reviewed-on: https://chromium-review.googlesource.com/826025 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
b51adda8d2
commit
457cc6a34f
4
.gn
4
.gn
@ -13,7 +13,3 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
buildconfig = "//build/BUILDCONFIG.gn"
|
buildconfig = "//build/BUILDCONFIG.gn"
|
||||||
|
|
||||||
# This secondary source root is used to put various forwarding/stub files that
|
|
||||||
# serve to make the core build files compatible with Chromium.
|
|
||||||
secondary_source = "//build/chromium_compatibility/"
|
|
||||||
|
5
BUILD.gn
5
BUILD.gn
@ -12,14 +12,13 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
import("build/crashpad_dependencies.gni")
|
||||||
import("build/crashpad_in_chromium.gni")
|
|
||||||
|
|
||||||
config("crashpad_config") {
|
config("crashpad_config") {
|
||||||
include_dirs = [ "." ]
|
include_dirs = [ "." ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crashpad_in_chromium) {
|
if (crashpad_is_in_chromium) {
|
||||||
test("crashpad_tests") {
|
test("crashpad_tests") {
|
||||||
deps = [
|
deps = [
|
||||||
"client:client_test",
|
"client:client_test",
|
||||||
|
@ -16,10 +16,18 @@
|
|||||||
# whether code is being built standalone, or in Chromium, or potentially in some
|
# whether code is being built standalone, or in Chromium, or potentially in some
|
||||||
# other configutation.
|
# other configutation.
|
||||||
|
|
||||||
import("crashpad_in_chromium.gni")
|
import("crashpad_dependencies.gni")
|
||||||
|
|
||||||
config("crashpad_in_chromium") {
|
config("crashpad_is_in_chromium") {
|
||||||
if (crashpad_in_chromium) {
|
if (crashpad_is_in_chromium) {
|
||||||
defines = [ "CRASHPAD_IN_CHROMIUM" ]
|
defines = [ "CRASHPAD_IS_IN_CHROMIUM" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
group("default_exe_manifest_win") {
|
||||||
|
if (crashpad_is_in_chromium) {
|
||||||
|
deps = [
|
||||||
|
"//build/win:default_exe_manifest",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,10 +65,6 @@ if (is_win) {
|
|||||||
default_configs = [
|
default_configs = [
|
||||||
"//third_party/mini_chromium/mini_chromium/build:default",
|
"//third_party/mini_chromium/mini_chromium/build:default",
|
||||||
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
|
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
|
||||||
|
|
||||||
# This (no-op) is added here so that build files that expect to be able to
|
|
||||||
# remove it can do so without causing an error.
|
|
||||||
"//build/config/compiler:chromium_code",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
set_defaults("source_set") {
|
set_defaults("source_set") {
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
This directory is used as a secondary GN source root for compatibility with
|
|
||||||
Chromium. Files in this subtree should match file paths that the Crashpad build
|
|
||||||
files need to refer to when building in Chromium. In the Crashpad tree, they
|
|
||||||
should either be empty/no-ops, or forward to the real Crashpad implementation
|
|
||||||
in the real tree. No actual configuration should be done in this secondary tree.
|
|
@ -1,19 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# This is a stub to match Chromium. This target is unused and has no effect when
|
|
||||||
# building standalone in Crashpad.
|
|
||||||
|
|
||||||
group("test_support") {
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# This is a stub to match Chromium. The configs in this file do not have any
|
|
||||||
# effect on the build when building standalone in Crashpad.
|
|
||||||
|
|
||||||
config("default_symbols") {
|
|
||||||
}
|
|
||||||
|
|
||||||
config("minimal_symbols") {
|
|
||||||
}
|
|
||||||
|
|
||||||
config("chromium_code") {
|
|
||||||
}
|
|
||||||
|
|
||||||
config("no_chromium_code") {
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# This is a stub to match Chromium, but is unused when building standalone in
|
|
||||||
# Crashpad.
|
|
@ -1,22 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# In Crashpad, sysroot.gni is in mini_chromium, forward to that one.
|
|
||||||
import("//third_party/mini_chromium/mini_chromium/build/sysroot.gni")
|
|
||||||
|
|
||||||
# To avoid Chromium Mac hermetic toolchain paths without explicitly checking
|
|
||||||
# whether building in Chromium mode.
|
|
||||||
if (is_mac) {
|
|
||||||
use_system_xcode = true
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# This is a stub to match Chromium. The configs in this file do not have any
|
|
||||||
# effect on the build when building standalone in Crashpad.
|
|
||||||
|
|
||||||
group("default_exe_manifest") {
|
|
||||||
}
|
|
||||||
|
|
||||||
config("console") {
|
|
||||||
}
|
|
||||||
|
|
||||||
config("windowed") {
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# This is a forwarding target to match the location that Chromium uses.
|
|
||||||
|
|
||||||
group("gmock") {
|
|
||||||
testonly = true
|
|
||||||
public_configs = [ "//third_party/gtest:gmock_public_config" ]
|
|
||||||
public_deps = [
|
|
||||||
"//third_party/gtest:gmock",
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
# This is a forwarding target to match the location that Chromium uses.
|
|
||||||
|
|
||||||
group("gtest") {
|
|
||||||
testonly = true
|
|
||||||
public_configs = [ "//third_party/gtest:gtest_public_config" ]
|
|
||||||
public_deps = [
|
|
||||||
"//third_party/gtest:gtest",
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
template("test") {
|
|
||||||
executable(target_name) {
|
|
||||||
testonly = true
|
|
||||||
forward_variables_from(invoker, "*")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set_defaults("test") {
|
|
||||||
configs = default_configs
|
|
||||||
}
|
|
43
build/crashpad_dependencies.gni
Normal file
43
build/crashpad_dependencies.gni
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
# Determines various flavors of build configuration, and which concrete
|
||||||
|
# targets to use for dependencies. Valid values are "standalone", "chromium",
|
||||||
|
# and "fuchsia".
|
||||||
|
crashpad_dependencies = "standalone"
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(
|
||||||
|
crashpad_dependencies == "chromium" || crashpad_dependencies == "fuchsia" ||
|
||||||
|
crashpad_dependencies == "standalone")
|
||||||
|
|
||||||
|
crashpad_is_in_chromium = crashpad_dependencies == "chromium"
|
||||||
|
crashpad_is_in_fuchsia = crashpad_dependencies == "fuchsia"
|
||||||
|
crashpad_is_standalone = crashpad_dependencies == "standalone"
|
||||||
|
|
||||||
|
if (crashpad_is_in_chromium) {
|
||||||
|
import("//testing/test.gni")
|
||||||
|
} else {
|
||||||
|
template("test") {
|
||||||
|
executable(target_name) {
|
||||||
|
testonly = true
|
||||||
|
forward_variables_from(invoker, "*")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set_defaults("test") {
|
||||||
|
configs = default_configs
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
declare_args() {
|
|
||||||
crashpad_in_chromium = false
|
|
||||||
}
|
|
@ -12,8 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
|
||||||
|
|
||||||
static_library("client") {
|
static_library("client") {
|
||||||
sources = [
|
sources = [
|
||||||
"annotation.cc",
|
"annotation.cc",
|
||||||
@ -64,8 +62,8 @@ static_library("client") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -102,10 +100,10 @@ source_set("client_test") {
|
|||||||
":client",
|
":client",
|
||||||
"../compat",
|
"../compat",
|
||||||
"../test",
|
"../test",
|
||||||
|
"../third_party/gtest:gmock",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//testing/gmock",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
|
||||||
|
|
||||||
static_library("handler") {
|
static_library("handler") {
|
||||||
sources = [
|
sources = [
|
||||||
"crash_report_upload_thread.cc",
|
"crash_report_upload_thread.cc",
|
||||||
@ -62,9 +60,9 @@ static_library("handler") {
|
|||||||
"../compat",
|
"../compat",
|
||||||
"../minidump",
|
"../minidump",
|
||||||
"../snapshot",
|
"../snapshot",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../tools:tool_support",
|
"../tools:tool_support",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -86,9 +84,9 @@ source_set("handler_test") {
|
|||||||
"../snapshot",
|
"../snapshot",
|
||||||
"../snapshot:test_support",
|
"../snapshot:test_support",
|
||||||
"../test",
|
"../test",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -107,9 +105,9 @@ executable("crashpad_handler") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../build:default_exe_manifest_win",
|
||||||
"../compat",
|
"../compat",
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
"//build/win:default_exe_manifest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac && is_component_build) {
|
if (is_mac && is_component_build) {
|
||||||
@ -143,11 +141,11 @@ executable("crashpad_handler_test_extended_handler") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../build:default_exe_manifest_win",
|
||||||
"../compat",
|
"../compat",
|
||||||
"../minidump:test_support",
|
"../minidump:test_support",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../tools:tool_support",
|
"../tools:tool_support",
|
||||||
"//base",
|
|
||||||
"//build/win:default_exe_manifest",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,9 +162,9 @@ if (is_win) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../build:default_exe_manifest_win",
|
||||||
"../compat",
|
"../compat",
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
"//build/win:default_exe_manifest",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
|
||||||
|
|
||||||
static_library("minidump") {
|
static_library("minidump") {
|
||||||
sources = [
|
sources = [
|
||||||
"minidump_annotation_writer.cc",
|
"minidump_annotation_writer.cc",
|
||||||
@ -77,8 +75,8 @@ static_library("minidump") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../snapshot",
|
"../snapshot",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -118,8 +116,8 @@ static_library("test_support") {
|
|||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"//base",
|
"../third_party/gtest:gtest",
|
||||||
"//testing/gtest",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -158,9 +156,9 @@ source_set("minidump_test") {
|
|||||||
":test_support",
|
":test_support",
|
||||||
"../snapshot:test_support",
|
"../snapshot:test_support",
|
||||||
"../test",
|
"../test",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//build/config/compiler/compiler.gni")
|
import("../build/crashpad_dependencies.gni")
|
||||||
import("//testing/test.gni")
|
|
||||||
|
|
||||||
static_library("snapshot") {
|
static_library("snapshot") {
|
||||||
sources = [
|
sources = [
|
||||||
@ -147,8 +146,8 @@ static_library("snapshot") {
|
|||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -171,8 +170,8 @@ if (is_win) {
|
|||||||
deps = [
|
deps = [
|
||||||
":snapshot",
|
":snapshot",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -210,8 +209,8 @@ static_library("test_support") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -262,9 +261,9 @@ source_set("snapshot_test") {
|
|||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
"../test",
|
"../test",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
@ -303,7 +302,7 @@ loadable_module("crashpad_snapshot_test_module") {
|
|||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +313,7 @@ loadable_module("crashpad_snapshot_test_module_large") {
|
|||||||
]
|
]
|
||||||
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE" ]
|
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE" ]
|
||||||
deps = [
|
deps = [
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,7 +324,7 @@ loadable_module("crashpad_snapshot_test_module_small") {
|
|||||||
]
|
]
|
||||||
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL" ]
|
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL" ]
|
||||||
deps = [
|
deps = [
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +353,7 @@ if (is_win) {
|
|||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,8 +365,8 @@ if (is_win) {
|
|||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,8 +378,8 @@ if (is_win) {
|
|||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,7 +391,7 @@ if (is_win) {
|
|||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,10 +403,10 @@ if (is_win) {
|
|||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
if (symbol_level == 0) {
|
if (crashpad_is_in_chromium && symbol_level == 0) {
|
||||||
# The tests that use this executable rely on at least minimal debug info.
|
# The tests that use this executable rely on at least minimal debug info.
|
||||||
configs -= [ "//build/config/compiler:default_symbols" ]
|
configs -= [ "//build/config/compiler:default_symbols" ]
|
||||||
configs += [ "//build/config/compiler:minimal_symbols" ]
|
configs += [ "//build/config/compiler:minimal_symbols" ]
|
||||||
@ -421,9 +420,9 @@ if (is_win) {
|
|||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
"../client",
|
"../client",
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
if (symbol_level == 0) {
|
if (crashpad_is_in_chromium && symbol_level == 0) {
|
||||||
# The tests that use this module rely on at least minimal debug info.
|
# The tests that use this module rely on at least minimal debug info.
|
||||||
configs -= [ "//build/config/compiler:default_symbols" ]
|
configs -= [ "//build/config/compiler:default_symbols" ]
|
||||||
configs += [ "//build/config/compiler:minimal_symbols" ]
|
configs += [ "//build/config/compiler:minimal_symbols" ]
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
|
||||||
|
|
||||||
static_library("test") {
|
static_library("test") {
|
||||||
testonly = true
|
testonly = true
|
||||||
|
|
||||||
@ -82,7 +80,7 @@ static_library("test") {
|
|||||||
|
|
||||||
public_configs = [ "..:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
configs += [ "../build:crashpad_in_chromium" ]
|
configs += [ "../build:crashpad_is_in_chromium" ]
|
||||||
|
|
||||||
data = [
|
data = [
|
||||||
"test_paths_test_data_root.txt",
|
"test_paths_test_data_root.txt",
|
||||||
@ -90,9 +88,9 @@ static_library("test") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
@ -140,10 +138,10 @@ source_set("test_test") {
|
|||||||
deps = [
|
deps = [
|
||||||
":test",
|
":test",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/gtest:gmock",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//testing/gmock",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
@ -162,14 +160,14 @@ static_library("gmock_main") {
|
|||||||
sources = [
|
sources = [
|
||||||
"gtest_main.cc",
|
"gtest_main.cc",
|
||||||
]
|
]
|
||||||
configs += [ "../build:crashpad_in_chromium" ]
|
configs += [ "../build:crashpad_is_in_chromium" ]
|
||||||
defines = [ "CRASHPAD_TEST_LAUNCHER_GMOCK" ]
|
defines = [ "CRASHPAD_TEST_LAUNCHER_GMOCK" ]
|
||||||
deps = [
|
deps = [
|
||||||
":test",
|
":test",
|
||||||
"//base",
|
"../third_party/gtest:gmock",
|
||||||
"//base/test:test_support",
|
"../third_party/gtest:gtest",
|
||||||
"//testing/gmock",
|
"../third_party/mini_chromium:base",
|
||||||
"//testing/gtest",
|
"../third_party/mini_chromium:base_test_support",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,12 +176,12 @@ static_library("gtest_main") {
|
|||||||
sources = [
|
sources = [
|
||||||
"gtest_main.cc",
|
"gtest_main.cc",
|
||||||
]
|
]
|
||||||
configs += [ "../build:crashpad_in_chromium" ]
|
configs += [ "../build:crashpad_is_in_chromium" ]
|
||||||
defines = [ "CRASHPAD_TEST_LAUNCHER_GTEST" ]
|
defines = [ "CRASHPAD_TEST_LAUNCHER_GTEST" ]
|
||||||
deps = [
|
deps = [
|
||||||
":test",
|
":test",
|
||||||
"//base",
|
"../third_party/gtest:gtest",
|
||||||
"//base/test:test_support",
|
"../third_party/mini_chromium:base",
|
||||||
"//testing/gtest",
|
"../third_party/mini_chromium:base_test_support",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -25,18 +25,18 @@
|
|||||||
#include "test/win/win_child_process.h"
|
#include "test/win/win_child_process.h"
|
||||||
#endif // OS_WIN
|
#endif // OS_WIN
|
||||||
|
|
||||||
#if defined(CRASHPAD_IN_CHROMIUM)
|
#if defined(CRASHPAD_IS_IN_CHROMIUM)
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/test/launcher/unit_test_launcher.h"
|
#include "base/test/launcher/unit_test_launcher.h"
|
||||||
#include "base/test/test_suite.h"
|
#include "base/test/test_suite.h"
|
||||||
#endif // CRASHPAD_IN_CHROMIUM
|
#endif // CRASHPAD_IS_IN_CHROMIUM
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
crashpad::test::InitializeMainArguments(argc, argv);
|
crashpad::test::InitializeMainArguments(argc, argv);
|
||||||
testing::AddGlobalTestEnvironment(
|
testing::AddGlobalTestEnvironment(
|
||||||
crashpad::test::DisabledTestGtestEnvironment::Get());
|
crashpad::test::DisabledTestGtestEnvironment::Get());
|
||||||
|
|
||||||
#if defined(CRASHPAD_IN_CHROMIUM)
|
#if defined(CRASHPAD_IS_IN_CHROMIUM)
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
// Chromium’s test launcher interferes with WinMultiprocess-based tests. Allow
|
// Chromium’s test launcher interferes with WinMultiprocess-based tests. Allow
|
||||||
@ -58,7 +58,7 @@ int main(int argc, char* argv[]) {
|
|||||||
base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
|
base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // CRASHPAD_IN_CHROMIUM
|
#endif // CRASHPAD_IS_IN_CHROMIUM
|
||||||
|
|
||||||
#if defined(CRASHPAD_TEST_LAUNCHER_GMOCK)
|
#if defined(CRASHPAD_TEST_LAUNCHER_GMOCK)
|
||||||
testing::InitGoogleMock(&argc, argv);
|
testing::InitGoogleMock(&argc, argv);
|
||||||
|
@ -127,12 +127,12 @@ base::FilePath TestPaths::Executable() {
|
|||||||
// static
|
// static
|
||||||
base::FilePath TestPaths::ExpectedExecutableBasename(
|
base::FilePath TestPaths::ExpectedExecutableBasename(
|
||||||
const base::FilePath::StringType& name) {
|
const base::FilePath::StringType& name) {
|
||||||
#if defined(CRASHPAD_IN_CHROMIUM)
|
#if defined(CRASHPAD_IS_IN_CHROMIUM)
|
||||||
base::FilePath::StringType executable_name(
|
base::FilePath::StringType executable_name(
|
||||||
FILE_PATH_LITERAL("crashpad_tests"));
|
FILE_PATH_LITERAL("crashpad_tests"));
|
||||||
#else // CRASHPAD_IN_CHROMIUM
|
#else // CRASHPAD_IS_IN_CHROMIUM
|
||||||
base::FilePath::StringType executable_name(name);
|
base::FilePath::StringType executable_name(name);
|
||||||
#endif // CRASHPAD_IN_CHROMIUM
|
#endif // CRASHPAD_IS_IN_CHROMIUM
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
executable_name += FILE_PATH_LITERAL(".exe");
|
executable_name += FILE_PATH_LITERAL(".exe");
|
||||||
@ -170,9 +170,9 @@ base::FilePath TestPaths::BuildArtifact(
|
|||||||
|
|
||||||
base::FilePath::StringType test_name =
|
base::FilePath::StringType test_name =
|
||||||
FILE_PATH_LITERAL("crashpad_") + module + FILE_PATH_LITERAL("_test");
|
FILE_PATH_LITERAL("crashpad_") + module + FILE_PATH_LITERAL("_test");
|
||||||
#if !defined(CRASHPAD_IN_CHROMIUM)
|
#if !defined(CRASHPAD_IS_IN_CHROMIUM)
|
||||||
CHECK(Executable().BaseName().RemoveFinalExtension().value() == test_name);
|
CHECK(Executable().BaseName().RemoveFinalExtension().value() == test_name);
|
||||||
#endif // !CRASHPAD_IN_CHROMIUM
|
#endif // !CRASHPAD_IS_IN_CHROMIUM
|
||||||
|
|
||||||
base::FilePath::StringType extension;
|
base::FilePath::StringType extension;
|
||||||
switch (file_type) {
|
switch (file_type) {
|
||||||
|
686
third_party/gtest/BUILD.gn
vendored
686
third_party/gtest/BUILD.gn
vendored
@ -12,349 +12,371 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
import("../../build/crashpad_dependencies.gni")
|
||||||
|
|
||||||
config("gtest_private_config") {
|
if (crashpad_is_in_chromium) {
|
||||||
visibility = [ ":*" ]
|
group("gtest") {
|
||||||
include_dirs = [ "gtest/googletest" ]
|
public_deps = [
|
||||||
defines = [ "GUNIT_NO_GOOGLE3=1" ]
|
"//testing/gtest",
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
group("gmock") {
|
||||||
|
public_deps = [
|
||||||
|
"//testing/gmock",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} else if (crashpad_is_in_fuchsia) {
|
||||||
|
# TODO(scottmg): Fuchsia doesn't have a third_party/gmock, and has a
|
||||||
|
# pre-gmock-integration gtest.
|
||||||
|
group("gtest") {
|
||||||
|
public_deps = [
|
||||||
|
"//third_party/gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} else if (crashpad_is_standalone) {
|
||||||
|
config("gtest_private_config") {
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
include_dirs = [ "gtest/googletest" ]
|
||||||
|
defines = [ "GUNIT_NO_GOOGLE3=1" ]
|
||||||
|
}
|
||||||
|
|
||||||
config("gtest_public_config") {
|
config("gtest_public_config") {
|
||||||
include_dirs = [ "gtest/googletest/include" ]
|
include_dirs = [ "gtest/googletest/include" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
static_library("gtest") {
|
static_library("gtest") {
|
||||||
testonly = true
|
testonly = true
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/include/gtest/gtest-death-test.h",
|
"gtest/googletest/include/gtest/gtest-death-test.h",
|
||||||
"gtest/googletest/include/gtest/gtest-message.h",
|
"gtest/googletest/include/gtest/gtest-message.h",
|
||||||
"gtest/googletest/include/gtest/gtest-param-test.h",
|
"gtest/googletest/include/gtest/gtest-param-test.h",
|
||||||
"gtest/googletest/include/gtest/gtest-printers.h",
|
"gtest/googletest/include/gtest/gtest-printers.h",
|
||||||
"gtest/googletest/include/gtest/gtest-spi.h",
|
"gtest/googletest/include/gtest/gtest-spi.h",
|
||||||
"gtest/googletest/include/gtest/gtest-test-part.h",
|
"gtest/googletest/include/gtest/gtest-test-part.h",
|
||||||
"gtest/googletest/include/gtest/gtest-typed-test.h",
|
"gtest/googletest/include/gtest/gtest-typed-test.h",
|
||||||
"gtest/googletest/include/gtest/gtest.h",
|
"gtest/googletest/include/gtest/gtest.h",
|
||||||
"gtest/googletest/include/gtest/gtest_pred_impl.h",
|
"gtest/googletest/include/gtest/gtest_pred_impl.h",
|
||||||
"gtest/googletest/include/gtest/gtest_prod.h",
|
"gtest/googletest/include/gtest/gtest_prod.h",
|
||||||
"gtest/googletest/include/gtest/internal/custom/gtest-port.h",
|
"gtest/googletest/include/gtest/internal/custom/gtest-port.h",
|
||||||
"gtest/googletest/include/gtest/internal/custom/gtest-printers.h",
|
"gtest/googletest/include/gtest/internal/custom/gtest-printers.h",
|
||||||
"gtest/googletest/include/gtest/internal/custom/gtest.h",
|
"gtest/googletest/include/gtest/internal/custom/gtest.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-death-test-internal.h",
|
"gtest/googletest/include/gtest/internal/gtest-death-test-internal.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-filepath.h",
|
"gtest/googletest/include/gtest/internal/gtest-filepath.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-internal.h",
|
"gtest/googletest/include/gtest/internal/gtest-internal.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-linked_ptr.h",
|
"gtest/googletest/include/gtest/internal/gtest-linked_ptr.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-param-util-generated.h",
|
"gtest/googletest/include/gtest/internal/gtest-param-util-generated.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-param-util.h",
|
"gtest/googletest/include/gtest/internal/gtest-param-util.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-port-arch.h",
|
"gtest/googletest/include/gtest/internal/gtest-port-arch.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-port.h",
|
"gtest/googletest/include/gtest/internal/gtest-port.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-string.h",
|
"gtest/googletest/include/gtest/internal/gtest-string.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-tuple.h",
|
"gtest/googletest/include/gtest/internal/gtest-tuple.h",
|
||||||
"gtest/googletest/include/gtest/internal/gtest-type-util.h",
|
"gtest/googletest/include/gtest/internal/gtest-type-util.h",
|
||||||
"gtest/googletest/src/gtest-all.cc",
|
"gtest/googletest/src/gtest-all.cc",
|
||||||
"gtest/googletest/src/gtest-death-test.cc",
|
"gtest/googletest/src/gtest-death-test.cc",
|
||||||
"gtest/googletest/src/gtest-filepath.cc",
|
"gtest/googletest/src/gtest-filepath.cc",
|
||||||
"gtest/googletest/src/gtest-internal-inl.h",
|
"gtest/googletest/src/gtest-internal-inl.h",
|
||||||
"gtest/googletest/src/gtest-port.cc",
|
"gtest/googletest/src/gtest-port.cc",
|
||||||
"gtest/googletest/src/gtest-printers.cc",
|
"gtest/googletest/src/gtest-printers.cc",
|
||||||
"gtest/googletest/src/gtest-test-part.cc",
|
"gtest/googletest/src/gtest-test-part.cc",
|
||||||
"gtest/googletest/src/gtest-typed-test.cc",
|
"gtest/googletest/src/gtest-typed-test.cc",
|
||||||
"gtest/googletest/src/gtest.cc",
|
"gtest/googletest/src/gtest.cc",
|
||||||
]
|
]
|
||||||
sources -= [ "gtest/googletest/src/gtest-all.cc" ]
|
sources -= [ "gtest/googletest/src/gtest-all.cc" ]
|
||||||
public_configs = [ ":gtest_public_config" ]
|
public_configs = [ ":gtest_public_config" ]
|
||||||
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
||||||
configs += [ ":gtest_private_config" ]
|
configs += [ ":gtest_private_config" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
static_library("gtest_main") {
|
static_library("gtest_main") {
|
||||||
# Tests outside of this file should use ../../test:gtest_main instead.
|
# Tests outside of this file should use ../../test:gtest_main instead.
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
|
|
||||||
testonly = true
|
testonly = true
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/src/gtest_main.cc",
|
"gtest/googletest/src/gtest_main.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":gtest",
|
":gtest",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
test("gtest_all_test") {
|
test("gtest_all_test") {
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/test/gtest-death-test_test.cc",
|
"gtest/googletest/test/gtest-death-test_test.cc",
|
||||||
"gtest/googletest/test/gtest-filepath_test.cc",
|
"gtest/googletest/test/gtest-filepath_test.cc",
|
||||||
"gtest/googletest/test/gtest-linked_ptr_test.cc",
|
"gtest/googletest/test/gtest-linked_ptr_test.cc",
|
||||||
"gtest/googletest/test/gtest-message_test.cc",
|
"gtest/googletest/test/gtest-message_test.cc",
|
||||||
"gtest/googletest/test/gtest-options_test.cc",
|
"gtest/googletest/test/gtest-options_test.cc",
|
||||||
"gtest/googletest/test/gtest-port_test.cc",
|
"gtest/googletest/test/gtest-port_test.cc",
|
||||||
"gtest/googletest/test/gtest-printers_test.cc",
|
"gtest/googletest/test/gtest-printers_test.cc",
|
||||||
"gtest/googletest/test/gtest-test-part_test.cc",
|
"gtest/googletest/test/gtest-test-part_test.cc",
|
||||||
"gtest/googletest/test/gtest-typed-test2_test.cc",
|
"gtest/googletest/test/gtest-typed-test2_test.cc",
|
||||||
"gtest/googletest/test/gtest-typed-test_test.cc",
|
"gtest/googletest/test/gtest-typed-test_test.cc",
|
||||||
"gtest/googletest/test/gtest-typed-test_test.h",
|
"gtest/googletest/test/gtest-typed-test_test.h",
|
||||||
"gtest/googletest/test/gtest_main_unittest.cc",
|
"gtest/googletest/test/gtest_main_unittest.cc",
|
||||||
"gtest/googletest/test/gtest_pred_impl_unittest.cc",
|
"gtest/googletest/test/gtest_pred_impl_unittest.cc",
|
||||||
"gtest/googletest/test/gtest_prod_test.cc",
|
"gtest/googletest/test/gtest_prod_test.cc",
|
||||||
"gtest/googletest/test/gtest_unittest.cc",
|
"gtest/googletest/test/gtest_unittest.cc",
|
||||||
"gtest/googletest/test/production.cc",
|
"gtest/googletest/test/production.cc",
|
||||||
"gtest/googletest/test/production.h",
|
"gtest/googletest/test/production.h",
|
||||||
]
|
]
|
||||||
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
||||||
configs += [ ":gtest_private_config" ]
|
configs += [ ":gtest_private_config" ]
|
||||||
deps = [
|
deps = [
|
||||||
":gtest",
|
":gtest",
|
||||||
":gtest_main",
|
":gtest_main",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
test("gtest_environment_test") {
|
test("gtest_environment_test") {
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/test/gtest_environment_test.cc",
|
"gtest/googletest/test/gtest_environment_test.cc",
|
||||||
]
|
]
|
||||||
configs += [ ":gtest_private_config" ]
|
configs += [ ":gtest_private_config" ]
|
||||||
deps = [
|
deps = [
|
||||||
":gtest",
|
":gtest",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
test("gtest_listener_test") {
|
test("gtest_listener_test") {
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/test/gtest-listener_test.cc",
|
"gtest/googletest/test/gtest-listener_test.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":gtest",
|
":gtest",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
test("gtest_no_test") {
|
test("gtest_no_test") {
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/test/gtest_no_test_unittest.cc",
|
"gtest/googletest/test/gtest_no_test_unittest.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":gtest",
|
":gtest",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
test("gtest_param_test") {
|
test("gtest_param_test") {
|
||||||
sources = [
|
sources = [
|
||||||
"gtest/googletest/test/gtest-param-test2_test.cc",
|
"gtest/googletest/test/gtest-param-test2_test.cc",
|
||||||
"gtest/googletest/test/gtest-param-test_test.cc",
|
"gtest/googletest/test/gtest-param-test_test.cc",
|
||||||
"gtest/googletest/test/gtest-param-test_test.h",
|
"gtest/googletest/test/gtest-param-test_test.h",
|
||||||
]
|
]
|
||||||
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
||||||
configs += [ ":gtest_private_config" ]
|
configs += [ ":gtest_private_config" ]
|
||||||
deps = [
|
deps = [
|
||||||
":gtest",
|
":gtest",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags_cc = [
|
cflags_cc = [
|
||||||
# For gtest/googlemock/test/gmock-matchers_test.cc’s Unstreamable::value_.
|
# For gtest/googlemock/test/gmock-matchers_test.cc’s
|
||||||
"-Wno-unused-private-field",
|
# Unstreamable::value_.
|
||||||
|
"-Wno-unused-private-field",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gtest_premature_exit_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googletest/test/gtest_premature_exit_test.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gtest_repeat_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googletest/test/gtest_repeat_test.cc",
|
||||||
|
]
|
||||||
|
configs += [ ":gtest_private_config" ]
|
||||||
|
deps = [
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gtest_sole_header_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googletest/test/gtest_sole_header_test.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":gtest",
|
||||||
|
":gtest_main",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gtest_stress_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googletest/test/gtest_stress_test.cc",
|
||||||
|
]
|
||||||
|
configs += [ ":gtest_private_config" ]
|
||||||
|
deps = [
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gtest_unittest_api_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googletest/test/gtest-unittest-api_test.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("gtest_all_tests") {
|
||||||
|
testonly = true
|
||||||
|
deps = [
|
||||||
|
":gtest_all_test",
|
||||||
|
":gtest_environment_test",
|
||||||
|
":gtest_listener_test",
|
||||||
|
":gtest_no_test",
|
||||||
|
":gtest_param_test",
|
||||||
|
":gtest_premature_exit_test",
|
||||||
|
":gtest_repeat_test",
|
||||||
|
":gtest_sole_header_test",
|
||||||
|
":gtest_stress_test",
|
||||||
|
":gtest_unittest_api_test",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
config("gmock_private_config") {
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
include_dirs = [ "gtest/googlemock" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
config("gmock_public_config") {
|
||||||
|
include_dirs = [ "gtest/googlemock/include" ]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
cflags_cc = [
|
||||||
|
# The MOCK_METHODn() macros do not specify “override”, which triggers
|
||||||
|
# this warning in users: “error: 'Method' overrides a member function
|
||||||
|
# but is not marked 'override'
|
||||||
|
# [-Werror,-Winconsistent-missing-override]”. Suppress these warnings
|
||||||
|
# until https://github.com/google/googletest/issues/533 is fixed.
|
||||||
|
"-Wno-inconsistent-missing-override",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static_library("gmock") {
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"gtest/googlemock/include/gmock/gmock-actions.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-cardinalities.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-generated-actions.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-generated-function-mockers.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-generated-matchers.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-generated-nice-strict.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-matchers.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-more-actions.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-more-matchers.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock-spec-builders.h",
|
||||||
|
"gtest/googlemock/include/gmock/gmock.h",
|
||||||
|
"gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
|
||||||
|
"gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h",
|
||||||
|
"gtest/googlemock/include/gmock/internal/custom/gmock-port.h",
|
||||||
|
"gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
|
||||||
|
"gtest/googlemock/include/gmock/internal/gmock-internal-utils.h",
|
||||||
|
"gtest/googlemock/include/gmock/internal/gmock-port.h",
|
||||||
|
"gtest/googlemock/src/gmock-all.cc",
|
||||||
|
"gtest/googlemock/src/gmock-cardinalities.cc",
|
||||||
|
"gtest/googlemock/src/gmock-internal-utils.cc",
|
||||||
|
"gtest/googlemock/src/gmock-matchers.cc",
|
||||||
|
"gtest/googlemock/src/gmock-spec-builders.cc",
|
||||||
|
"gtest/googlemock/src/gmock.cc",
|
||||||
|
]
|
||||||
|
sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
|
||||||
|
public_configs = [ ":gmock_public_config" ]
|
||||||
|
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
||||||
|
configs += [ ":gmock_private_config" ]
|
||||||
|
deps = [
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
static_library("gmock_main") {
|
||||||
|
# Tests outside of this file should use ../../test:gmock_main instead.
|
||||||
|
visibility = [ ":*" ]
|
||||||
|
testonly = true
|
||||||
|
sources = [
|
||||||
|
"gtest/googlemock/src/gmock_main.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":gmock",
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gmock_all_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googlemock/test/gmock-actions_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-cardinalities_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-generated-actions_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-generated-function-mockers_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-generated-internal-utils_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-generated-matchers_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-internal-utils_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-matchers_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-more-actions_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-nice-strict_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-port_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock-spec-builders_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock_test.cc",
|
||||||
|
]
|
||||||
|
configs += [
|
||||||
|
":gmock_private_config",
|
||||||
|
":gtest_private_config",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":gmock",
|
||||||
|
":gmock_main",
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (is_clang) {
|
||||||
|
cflags_cc = [
|
||||||
|
# For gtest/googlemock/test/gmock-matchers_test.cc’s
|
||||||
|
# testing::gmock_matchers_test::Unprintable::c_.
|
||||||
|
"-Wno-unused-private-field",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gmock_link_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googlemock/test/gmock_link2_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock_link_test.cc",
|
||||||
|
"gtest/googlemock/test/gmock_link_test.h",
|
||||||
|
]
|
||||||
|
configs += [ ":gmock_private_config" ]
|
||||||
|
deps = [
|
||||||
|
":gmock",
|
||||||
|
":gmock_main",
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
test("gmock_stress_test") {
|
||||||
|
sources = [
|
||||||
|
"gtest/googlemock/test/gmock_stress_test.cc",
|
||||||
|
]
|
||||||
|
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
||||||
|
configs += [ ":gmock_private_config" ]
|
||||||
|
deps = [
|
||||||
|
":gmock",
|
||||||
|
":gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
group("gmock_all_tests") {
|
||||||
|
testonly = true
|
||||||
|
deps = [
|
||||||
|
":gmock_all_test",
|
||||||
|
":gmock_link_test",
|
||||||
|
":gmock_stress_test",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test("gtest_premature_exit_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googletest/test/gtest_premature_exit_test.cc",
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gtest_repeat_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googletest/test/gtest_repeat_test.cc",
|
|
||||||
]
|
|
||||||
configs += [ ":gtest_private_config" ]
|
|
||||||
deps = [
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gtest_sole_header_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googletest/test/gtest_sole_header_test.cc",
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":gtest",
|
|
||||||
":gtest_main",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gtest_stress_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googletest/test/gtest_stress_test.cc",
|
|
||||||
]
|
|
||||||
configs += [ ":gtest_private_config" ]
|
|
||||||
deps = [
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gtest_unittest_api_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googletest/test/gtest-unittest-api_test.cc",
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
group("gtest_all_tests") {
|
|
||||||
testonly = true
|
|
||||||
deps = [
|
|
||||||
":gtest_all_test",
|
|
||||||
":gtest_environment_test",
|
|
||||||
":gtest_listener_test",
|
|
||||||
":gtest_no_test",
|
|
||||||
":gtest_param_test",
|
|
||||||
":gtest_premature_exit_test",
|
|
||||||
":gtest_repeat_test",
|
|
||||||
":gtest_sole_header_test",
|
|
||||||
":gtest_stress_test",
|
|
||||||
":gtest_unittest_api_test",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("gmock_private_config") {
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
include_dirs = [ "gtest/googlemock" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("gmock_public_config") {
|
|
||||||
include_dirs = [ "gtest/googlemock/include" ]
|
|
||||||
|
|
||||||
if (is_clang) {
|
|
||||||
cflags_cc = [
|
|
||||||
# The MOCK_METHODn() macros do not specify “override”, which triggers this
|
|
||||||
# warning in users: “error: 'Method' overrides a member function but is
|
|
||||||
# not marked 'override' [-Werror,-Winconsistent-missing-override]”.
|
|
||||||
# Suppress these warnings until
|
|
||||||
# https://github.com/google/googletest/issues/533 is fixed.
|
|
||||||
"-Wno-inconsistent-missing-override",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static_library("gmock") {
|
|
||||||
testonly = true
|
|
||||||
sources = [
|
|
||||||
"gtest/googlemock/include/gmock/gmock-actions.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-cardinalities.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-generated-actions.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-generated-function-mockers.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-generated-matchers.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-generated-nice-strict.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-matchers.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-more-actions.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-more-matchers.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock-spec-builders.h",
|
|
||||||
"gtest/googlemock/include/gmock/gmock.h",
|
|
||||||
"gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
|
|
||||||
"gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h",
|
|
||||||
"gtest/googlemock/include/gmock/internal/custom/gmock-port.h",
|
|
||||||
"gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
|
|
||||||
"gtest/googlemock/include/gmock/internal/gmock-internal-utils.h",
|
|
||||||
"gtest/googlemock/include/gmock/internal/gmock-port.h",
|
|
||||||
"gtest/googlemock/src/gmock-all.cc",
|
|
||||||
"gtest/googlemock/src/gmock-cardinalities.cc",
|
|
||||||
"gtest/googlemock/src/gmock-internal-utils.cc",
|
|
||||||
"gtest/googlemock/src/gmock-matchers.cc",
|
|
||||||
"gtest/googlemock/src/gmock-spec-builders.cc",
|
|
||||||
"gtest/googlemock/src/gmock.cc",
|
|
||||||
]
|
|
||||||
sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
|
|
||||||
public_configs = [ ":gmock_public_config" ]
|
|
||||||
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
|
||||||
configs += [ ":gmock_private_config" ]
|
|
||||||
deps = [
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
static_library("gmock_main") {
|
|
||||||
# Tests outside of this file should use ../../test:gmock_main instead.
|
|
||||||
visibility = [ ":*" ]
|
|
||||||
testonly = true
|
|
||||||
sources = [
|
|
||||||
"gtest/googlemock/src/gmock_main.cc",
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":gmock",
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gmock_all_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googlemock/test/gmock-actions_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-cardinalities_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-generated-actions_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-generated-function-mockers_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-generated-internal-utils_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-generated-matchers_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-internal-utils_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-matchers_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-more-actions_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-nice-strict_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-port_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock-spec-builders_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock_test.cc",
|
|
||||||
]
|
|
||||||
configs += [
|
|
||||||
":gmock_private_config",
|
|
||||||
":gtest_private_config",
|
|
||||||
]
|
|
||||||
deps = [
|
|
||||||
":gmock",
|
|
||||||
":gmock_main",
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
|
|
||||||
if (is_clang) {
|
|
||||||
cflags_cc = [
|
|
||||||
# For gtest/googlemock/test/gmock-matchers_test.cc’s
|
|
||||||
# testing::gmock_matchers_test::Unprintable::c_.
|
|
||||||
"-Wno-unused-private-field",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gmock_link_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googlemock/test/gmock_link2_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock_link_test.cc",
|
|
||||||
"gtest/googlemock/test/gmock_link_test.h",
|
|
||||||
]
|
|
||||||
configs += [ ":gmock_private_config" ]
|
|
||||||
deps = [
|
|
||||||
":gmock",
|
|
||||||
":gmock_main",
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
test("gmock_stress_test") {
|
|
||||||
sources = [
|
|
||||||
"gtest/googlemock/test/gmock_stress_test.cc",
|
|
||||||
]
|
|
||||||
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
|
|
||||||
configs += [ ":gmock_private_config" ]
|
|
||||||
deps = [
|
|
||||||
":gmock",
|
|
||||||
":gtest",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
group("gmock_all_tests") {
|
|
||||||
testonly = true
|
|
||||||
deps = [
|
|
||||||
":gmock_all_test",
|
|
||||||
":gmock_link_test",
|
|
||||||
":gmock_stress_test",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -12,15 +12,28 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# This target is a stub so that both Crashpad and Chromium can refer to "//base"
|
import("../../build/crashpad_dependencies.gni")
|
||||||
# in their build files. When building in the Chromium tree, "//base" will refer
|
|
||||||
# the "real" base, but when building standalone in Crashpad, we forward those
|
|
||||||
# references on to mini_chromium.
|
|
||||||
|
|
||||||
group("base") {
|
group("base") {
|
||||||
public_configs =
|
if (crashpad_is_in_chromium) {
|
||||||
[ "//third_party/mini_chromium/mini_chromium/base:base_public_config" ]
|
public_deps = [
|
||||||
public_deps = [
|
"//base",
|
||||||
"//third_party/mini_chromium/mini_chromium/base",
|
]
|
||||||
]
|
} else if (crashpad_is_in_fuchsia) {
|
||||||
|
public_deps = [
|
||||||
|
"//third_party/mini_chromium/base",
|
||||||
|
]
|
||||||
|
} else if (crashpad_is_standalone) {
|
||||||
|
public_deps = [
|
||||||
|
"//third_party/mini_chromium/mini_chromium/base",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
group("base_test_support") {
|
||||||
|
if (crashpad_is_in_chromium) {
|
||||||
|
public_deps = [
|
||||||
|
"//base:test_support",
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
4
third_party/zlib/BUILD.gn
vendored
4
third_party/zlib/BUILD.gn
vendored
@ -12,9 +12,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("../../build/crashpad_in_chromium.gni")
|
import("../../build/crashpad_dependencies.gni")
|
||||||
|
|
||||||
if (crashpad_in_chromium) {
|
if (crashpad_is_in_chromium) {
|
||||||
zlib_source = "chromium"
|
zlib_source = "chromium"
|
||||||
} else if (!is_win && !is_fuchsia) {
|
} else if (!is_win && !is_fuchsia) {
|
||||||
zlib_source = "system"
|
zlib_source = "system"
|
||||||
|
@ -21,7 +21,7 @@ source_set("tool_support") {
|
|||||||
public_configs = [ "..:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"//base",
|
"../third_party/mini_chromium:base",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,11 +32,11 @@ executable("crashpad_database_util") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../build:default_exe_manifest_win",
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//build/win:default_exe_manifest",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,10 +47,10 @@ executable("crashpad_http_upload") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../build:default_exe_manifest_win",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//build/win:default_exe_manifest",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,12 +61,12 @@ executable("generate_dump") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../build:default_exe_manifest_win",
|
||||||
"../compat",
|
"../compat",
|
||||||
"../minidump",
|
"../minidump",
|
||||||
"../snapshot",
|
"../snapshot",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
"//build/win:default_exe_manifest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
@ -97,8 +97,8 @@ if (is_mac) {
|
|||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,8 +122,8 @@ if (is_mac) {
|
|||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,8 +140,8 @@ if (is_mac) {
|
|||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,8 +154,8 @@ if (is_mac) {
|
|||||||
":tool_support",
|
":tool_support",
|
||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../util",
|
"../util",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,14 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//testing/test.gni")
|
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
import("//build/config/sysroot.gni")
|
import("../build/crashpad_dependencies.gni")
|
||||||
|
|
||||||
|
if (crashpad_is_in_chromium) {
|
||||||
|
import("//build/config/sysroot.gni")
|
||||||
|
} else {
|
||||||
|
import("//third_party/mini_chromium/mini_chromium/build/sysroot.gni")
|
||||||
|
}
|
||||||
|
|
||||||
action_foreach("mig") {
|
action_foreach("mig") {
|
||||||
script = "mach/mig.py"
|
script = "mach/mig.py"
|
||||||
@ -36,11 +40,13 @@ if (is_mac) {
|
|||||||
|
|
||||||
args = [ "{{source}}" ]
|
args = [ "{{source}}" ]
|
||||||
args += rebase_path(outputs, root_build_dir)
|
args += rebase_path(outputs, root_build_dir)
|
||||||
if (!use_system_xcode) {
|
if (crashpad_is_in_chromium) {
|
||||||
args += [
|
if (!use_system_xcode) {
|
||||||
"--developer-dir",
|
args += [
|
||||||
hermetic_xcode_path,
|
"--developer-dir",
|
||||||
]
|
hermetic_xcode_path,
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sysroot != "") {
|
if (sysroot != "") {
|
||||||
args += [
|
args += [
|
||||||
@ -328,8 +334,8 @@ static_library("util") {
|
|||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../third_party/zlib",
|
"../third_party/zlib",
|
||||||
"//base",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
@ -470,10 +476,10 @@ source_set("util_test") {
|
|||||||
"../client",
|
"../client",
|
||||||
"../compat",
|
"../compat",
|
||||||
"../test",
|
"../test",
|
||||||
|
"../third_party/gtest:gmock",
|
||||||
|
"../third_party/gtest:gtest",
|
||||||
|
"../third_party/mini_chromium:base",
|
||||||
"../third_party/zlib",
|
"../third_party/zlib",
|
||||||
"//base",
|
|
||||||
"//testing/gmock",
|
|
||||||
"//testing/gtest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user