Commit 4266a7d4 authored by amistry's avatar amistry Committed by Commit bot

Roll gtest.

The change in directory structure requires the checkout to be moved to
a different directory, and some dummy header files that re-direct to the
new location.

TBR=juliatuttle@chromium.org

Review-Url: https://codereview.chromium.org/2163573002
Cr-Commit-Position: refs/heads/master@{#406741}
parent e0a5b1e2
...@@ -277,7 +277,7 @@ vs-chromium-project.txt ...@@ -277,7 +277,7 @@ vs-chromium-project.txt
/sync/sync.xml /sync/sync.xml
/sync_testserver.log /sync_testserver.log
/testing/gmock /testing/gmock
/testing/gtest /testing/gtest/third_party/googletest
/testserver.log /testserver.log
/tools/luci-go/linux64/isolate /tools/luci-go/linux64/isolate
/tools/luci-go/mac64/isolate /tools/luci-go/mac64/isolate
......
...@@ -114,8 +114,8 @@ deps = { ...@@ -114,8 +114,8 @@ deps = {
'src/sdch/open-vcdiff': 'src/sdch/open-vcdiff':
Var('chromium_git') + '/external/github.com/google/open-vcdiff.git' + '@' + '21d7d0b9c3d0c3ccbdb221c85ae889373f0a2a58', Var('chromium_git') + '/external/github.com/google/open-vcdiff.git' + '@' + '21d7d0b9c3d0c3ccbdb221c85ae889373f0a2a58',
'src/testing/gtest': 'src/testing/third_party/googletest':
Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '6f8a66431cb592dad629028a50b3dd418a408c87', Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'ec44c6c1675c25b9827aacd08c02433cccde7780',
'src/testing/gmock': 'src/testing/gmock':
Var('chromium_git') + '/external/googlemock.git' + '@' + '0421b6f358139f02e102c9c332ce19a33faf75be', # from svn revision 566 Var('chromium_git') + '/external/googlemock.git' + '@' + '0421b6f358139f02e102c9c332ce19a33faf75be', # from svn revision 566
......
...@@ -670,8 +670,8 @@ TEST_F(SequencedSocketDataTest, SingleSyncWriteTooSmall) { ...@@ -670,8 +670,8 @@ TEST_F(SequencedSocketDataTest, SingleSyncWriteTooSmall) {
static const char* kExpectedFailures[] = { static const char* kExpectedFailures[] = {
"Expected: (data.length()) >= (expected_data.length())", "Expected: (data.length()) >= (expected_data.length())",
"Value of: actual_data", "To be equal to: actual_data",
"Value of: sock_->Write(buf.get(), len, failing_callback_)"}; "To be equal to: sock_->Write(buf.get(), len, failing_callback_)"};
ASSERT_EQ(arraysize(kExpectedFailures), ASSERT_EQ(arraysize(kExpectedFailures),
static_cast<size_t>(gtest_failures.size())); static_cast<size_t>(gtest_failures.size()));
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
'<@(gtest_sources)', '<@(gtest_sources)',
], ],
'include_dirs': [ 'include_dirs': [
'gtest', 'third_party/googletest/googletest',
'gtest/include', 'third_party/googletest/googletest/include',
], ],
'dependencies': [ 'dependencies': [
'gtest_prod', 'gtest_prod',
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
'UNIT_TEST', 'UNIT_TEST',
], ],
'include_dirs': [ 'include_dirs': [
'gtest/include', # So that gtest headers can find themselves. 'third_party/googletest/googletest/include', # So that gtest headers can find themselves.
], ],
'target_conditions': [ 'target_conditions': [
['_type=="executable"', { ['_type=="executable"', {
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
'gtest', 'gtest',
], ],
'sources': [ 'sources': [
'gtest/src/gtest_main.cc', 'third_party/googletest/googletest/src/gtest_main.cc',
], ],
}, },
{ {
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
'gtest/include/gtest/gtest_prod.h', 'gtest/include/gtest/gtest_prod.h',
'third_party/googletest/googletest/include/gtest/gtest_prod.h',
], ],
}, },
], ],
......
...@@ -25,14 +25,34 @@ ...@@ -25,14 +25,34 @@
'gtest/include/gtest/internal/gtest-string.h', 'gtest/include/gtest/internal/gtest-string.h',
'gtest/include/gtest/internal/gtest-tuple.h', 'gtest/include/gtest/internal/gtest-tuple.h',
'gtest/include/gtest/internal/gtest-type-util.h', 'gtest/include/gtest/internal/gtest-type-util.h',
'gtest/src/gtest-death-test.cc', 'third_party/googletest/googletest/include/gtest/gtest-death-test.h',
'gtest/src/gtest-filepath.cc', 'third_party/googletest/googletest/include/gtest/gtest-message.h',
'gtest/src/gtest-internal-inl.h', 'third_party/googletest/googletest/include/gtest/gtest-param-test.h',
'gtest/src/gtest-port.cc', 'third_party/googletest/googletest/include/gtest/gtest-printers.h',
'gtest/src/gtest-printers.cc', 'third_party/googletest/googletest/include/gtest/gtest-spi.h',
'gtest/src/gtest-test-part.cc', 'third_party/googletest/googletest/include/gtest/gtest-test-part.h',
'gtest/src/gtest-typed-test.cc', 'third_party/googletest/googletest/include/gtest/gtest-typed-test.h',
'gtest/src/gtest.cc', 'third_party/googletest/googletest/include/gtest/gtest.h',
'third_party/googletest/googletest/include/gtest/gtest_pred_impl.h',
'third_party/googletest/googletest/include/gtest/gtest_prod.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-internal.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-port.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-string.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-tuple.h',
'third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h',
'third_party/googletest/googletest/src/gtest-death-test.cc',
'third_party/googletest/googletest/src/gtest-filepath.cc',
'third_party/googletest/googletest/src/gtest-internal-inl.h',
'third_party/googletest/googletest/src/gtest-port.cc',
'third_party/googletest/googletest/src/gtest-printers.cc',
'third_party/googletest/googletest/src/gtest-test-part.cc',
'third_party/googletest/googletest/src/gtest-typed-test.cc',
'third_party/googletest/googletest/src/gtest.cc',
'multiprocess_func_list.cc', 'multiprocess_func_list.cc',
'multiprocess_func_list.h', 'multiprocess_func_list.h',
'platform_test.h', 'platform_test.h',
......
...@@ -20,7 +20,7 @@ config("gtest_config") { ...@@ -20,7 +20,7 @@ config("gtest_config") {
] ]
# Gtest headers need to be able to find themselves. # Gtest headers need to be able to find themselves.
include_dirs = [ "include" ] include_dirs = [ "../third_party/googletest/googletest/include" ]
if (is_win) { if (is_win) {
cflags = [ "/wd4800" ] # Unused variable warning. cflags = [ "/wd4800" ] # Unused variable warning.
...@@ -60,18 +60,28 @@ config("gtest_direct_config") { ...@@ -60,18 +60,28 @@ config("gtest_direct_config") {
defines = [ "UNIT_TEST" ] defines = [ "UNIT_TEST" ]
} }
config("gtest_warnings") {
if (is_win && is_clang) {
# The Mutex constructor initializer list in gtest-port.cc is incorrectly
# ordered. See
# https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ.
cflags = [ "-Wno-reorder" ]
}
}
static_library("gtest") { static_library("gtest") {
testonly = true testonly = true
sources = [ sources = [
"../third_party/googletest/googletest/include/gtest/gtest-death-test.h",
"../third_party/googletest/googletest/include/gtest/gtest-message.h",
"../third_party/googletest/googletest/include/gtest/gtest-param-test.h",
"../third_party/googletest/googletest/include/gtest/gtest-printers.h",
"../third_party/googletest/googletest/include/gtest/gtest-spi.h",
"../third_party/googletest/googletest/include/gtest/gtest-test-part.h",
"../third_party/googletest/googletest/include/gtest/gtest-typed-test.h",
"../third_party/googletest/googletest/include/gtest/gtest.h",
"../third_party/googletest/googletest/include/gtest/gtest_pred_impl.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-internal.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-port.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-string.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-tuple.h",
"../third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h",
"include/gtest/gtest-death-test.h", "include/gtest/gtest-death-test.h",
"include/gtest/gtest-message.h", "include/gtest/gtest-message.h",
"include/gtest/gtest-param-test.h", "include/gtest/gtest-param-test.h",
...@@ -93,14 +103,14 @@ static_library("gtest") { ...@@ -93,14 +103,14 @@ static_library("gtest") {
"include/gtest/internal/gtest-type-util.h", "include/gtest/internal/gtest-type-util.h",
#"gtest/src/gtest-all.cc", # Not needed by our build. #"gtest/src/gtest-all.cc", # Not needed by our build.
"src/gtest-death-test.cc", "../third_party/googletest/googletest/src/gtest-death-test.cc",
"src/gtest-filepath.cc", "../third_party/googletest/googletest/src/gtest-filepath.cc",
"src/gtest-internal-inl.h", "../third_party/googletest/googletest/src/gtest-internal-inl.h",
"src/gtest-port.cc", "../third_party/googletest/googletest/src/gtest-port.cc",
"src/gtest-printers.cc", "../third_party/googletest/googletest/src/gtest-printers.cc",
"src/gtest-test-part.cc", "../third_party/googletest/googletest/src/gtest-test-part.cc",
"src/gtest-typed-test.cc", "../third_party/googletest/googletest/src/gtest-typed-test.cc",
"src/gtest.cc", "../third_party/googletest/googletest/src/gtest.cc",
] ]
if (gtest_include_multiprocess) { if (gtest_include_multiprocess) {
...@@ -135,24 +145,19 @@ static_library("gtest") { ...@@ -135,24 +145,19 @@ static_library("gtest") {
] ]
} }
include_dirs = [ "." ] include_dirs = [ "../third_party/googletest/googletest" ]
all_dependent_configs = [ ":gtest_config" ] all_dependent_configs = [ ":gtest_config" ]
public_configs = [ ":gtest_direct_config" ] public_configs = [ ":gtest_direct_config" ]
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ configs += [ "//build/config/compiler:no_chromium_code" ]
"//build/config/compiler:no_chromium_code",
# Must be after no_chromium_code for warning flags to be ordered correctly.
":gtest_warnings",
]
} }
source_set("gtest_main") { source_set("gtest_main") {
testonly = true testonly = true
sources = [ sources = [
"src/gtest_main.cc", "../third_party/googletest/googletest/src/gtest_main.cc",
] ]
deps = [ deps = [
":gtest", ":gtest",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-death-test.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-message.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-param-test.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-printers.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-spi.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-test-part.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest-typed-test.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest_pred_impl.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/gtest_prod.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-port.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-string.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-tuple.h"
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "testing/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h"
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
'<@(gtest_sources)', '<@(gtest_sources)',
], ],
'include_dirs': [ 'include_dirs': [
'gtest', 'third_party/googletest/googletest',
'gtest/include', 'third_party/googletest/googletest/include',
], ],
'defines': [ 'defines': [
# In order to allow regex matches in gtest to be shared between # In order to allow regex matches in gtest to be shared between
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
'GTEST_HAS_RTTI=0', 'GTEST_HAS_RTTI=0',
], ],
'include_dirs': [ 'include_dirs': [
'gtest/include', # So that gtest headers can find themselves. 'third_party/googletest/googletest/include', # So that gtest headers can find themselves.
], ],
}, },
}, },
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
'gtest_nacl', 'gtest_nacl',
], ],
'sources': [ 'sources': [
'gtest/src/gtest_main.cc', 'third_party/googletest/googletest/src/gtest_main.cc',
], ],
'all_dependent_settings': { 'all_dependent_settings': {
'link_flags': [ 'link_flags': [
......
...@@ -638,6 +638,10 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = { ...@@ -638,6 +638,10 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
# https://github.com/PyCQA/pylint/issues/894 # https://github.com/PyCQA/pylint/issues/894
'UNKNOWN', 'UNKNOWN',
], ],
# Trivial script lacking a license. Not used by Chromium.
'testing/third_party/googletest/travis.sh': [
'UNKNOWN',
],
} }
EXCLUDED_PATHS = [ EXCLUDED_PATHS = [
......
...@@ -110,7 +110,6 @@ ADDITIONAL_PATHS = ( ...@@ -110,7 +110,6 @@ ADDITIONAL_PATHS = (
os.path.join('net', 'tools', 'spdyshark'), os.path.join('net', 'tools', 'spdyshark'),
os.path.join('sdch', 'open-vcdiff'), os.path.join('sdch', 'open-vcdiff'),
os.path.join('testing', 'gmock'), os.path.join('testing', 'gmock'),
os.path.join('testing', 'gtest'),
os.path.join('tools', 'gyp'), os.path.join('tools', 'gyp'),
os.path.join('tools', 'page_cycler', 'acid3'), os.path.join('tools', 'page_cycler', 'acid3'),
os.path.join('url', 'third_party', 'mozilla'), os.path.join('url', 'third_party', 'mozilla'),
...@@ -142,7 +141,7 @@ SPECIAL_CASES = { ...@@ -142,7 +141,7 @@ SPECIAL_CASES = {
"License": "BSD", "License": "BSD",
"License File": "NOT_SHIPPED", "License File": "NOT_SHIPPED",
}, },
os.path.join('testing', 'gtest'): { os.path.join('testing', 'third_party', 'googletest'): {
"Name": "gtest", "Name": "gtest",
"URL": "http://code.google.com/p/googletest", "URL": "http://code.google.com/p/googletest",
"License": "BSD", "License": "BSD",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment