Skip to content

Commit

Permalink
Roll Google Test.
Browse files Browse the repository at this point in the history
Updates our build files to be more consistent with Chromium.

Also rolls SPIRV-Tools to use newer test fixture syntax.
Note: requires an update to SPIRV-Tools to pass 'gn check'.

Bug: angleproject:3151
Change-Id: I8abddef396f84e5c58cdd185421f03fd6e2b6d58
Reviewed-on: https://chromium-review.googlesource.com/c/1470591
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@google.com>
  • Loading branch information
null77 authored and Commit Bot committed Feb 22, 2019
1 parent b9039bf commit cf9b285
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 54 deletions.
9 changes: 7 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vars = {
'spirv_headers_revision': '79b6681aadcb53c27d1052e5f8a0e82a981dbf2f',

# Current revision of SPIRV-Tools for Vulkan.
'spirv_tools_revision': 'd14db341b834cfb3c574a258c331b3a6b1c2cbc5',
'spirv_tools_revision': 'fde69dcd80cc1ca548300702adf01eeb25441f3e',

# Current revision of Khronos Vulkan-Headers.
'vulkan_headers_revision': 'b65941cc4b2b43b74de00534d110b581c52c394b',
Expand Down Expand Up @@ -65,8 +65,13 @@ deps = {
'condition': 'not build_with_chromium',
},

'{angle_root}/third_party/googletest': {
'url': '{chromium_git}/chromium/src/third_party/googletest@660425b1c5ca04559ab7e50c7572b5b771acca1c',
'condition': 'not build_with_chromium',
},

'{angle_root}/third_party/googletest/src': {
'url': '{chromium_git}/external/github.com/google/googletest.git@5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081',
'url': '{chromium_git}/external/github.com/google/googletest.git@7203f37f57e4fef0d77670098aabc186309eb874',
'condition': 'not build_with_chromium',
},

Expand Down
17 changes: 17 additions & 0 deletions build_overrides/gtest.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Override settings for third_party integration with Google Test.

# Exclude support for registering main function in multi-process tests.
gtest_include_multiprocess = true

# Exclude support for platform-specific operations across unit tests.
gtest_include_platform_test = true

# Exclude support for testing Objective C code on OS X and iOS.
gtest_include_objc_support = true

# Exclude support for flushing coverage files on iOS.
gtest_include_ios_coverage = true
60 changes: 8 additions & 52 deletions src/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,60 +13,16 @@ declare_args() {
build_angle_gles1_conform_tests = false
}

googletest_deps = [
"//testing/gmock",
"//testing/gtest",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]

if (build_with_chromium) {
googletest_deps = [
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
googletest_deps += [ "//base/test:test_support" ]
} else {
googletest_deps = [
":angle_internal_gmock",
":angle_internal_gtest",
]

config("angle_internal_gtest_config") {
include_dirs = [
"${angle_googletest_dir}/googletest",
"${angle_googletest_dir}/googletest/include",
]
}

angle_static_library("angle_internal_gtest") {
sources = [
"${angle_googletest_dir}/googletest/src/gtest-all.cc",
]
public_configs += [ ":angle_internal_gtest_config" ]
configs -= [ "${angle_root}:extra_warnings" ]
if (is_fuchsia) {
deps = [
"//third_party/fuchsia-sdk/sdk:fdio",
"//third_party/fuchsia-sdk/sdk:zx",
]
}
}

config("angle_internal_gmock_config") {
include_dirs = [
"${angle_googletest_dir}/googlemock",
"${angle_googletest_dir}/googlemock/include",
"${angle_googletest_dir}/googletest/include",
]
if (is_clang) {
# TODO: Can remove this if/when the issue is fixed.
# https://github.com/google/googletest/issues/533
cflags = [ "-Wno-inconsistent-missing-override" ]
}
}

angle_static_library("angle_internal_gmock") {
sources = [
"${angle_googletest_dir}/googlemock/src/gmock-all.cc",
]
public_configs += [ ":angle_internal_gmock_config" ]
}

group("all") {
testonly = true
deps = [
Expand Down

0 comments on commit cf9b285

Please sign in to comment.