From 8193ed069c0925d6b899afc48986e920cf8ad484 Mon Sep 17 00:00:00 2001
From: Tengfei Niu <spartucus@users.noreply.github.com>
Date: Wed, 10 Oct 2018 11:53:37 +0800
Subject: [PATCH 1/8] Update .gitignore

ignore .DS_Store on macOS.
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index 73cdd2c2..d6916f5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,8 @@ googletest/fused-src/
 
 # macOS files
 .DS_Store
+googletest/.DS_Store
+googletest/xcode/.DS_Store
 
 # Ignore cmake generated directories and files.
 CMakeFiles

From a83429f5d31ad7c48bb0493475f8a77450f03311 Mon Sep 17 00:00:00 2001
From: Ryan Yee <ryee88@gmail.com>
Date: Sat, 6 Oct 2018 02:29:49 -0700
Subject: [PATCH 2/8] fix typo

---
 ci/env-osx.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ci/env-osx.sh b/ci/env-osx.sh
index 127a969b..03c2d15d 100755
--- a/ci/env-osx.sh
+++ b/ci/env-osx.sh
@@ -34,7 +34,8 @@
 #
 
 # TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}.
+#
 
-if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
+if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
     if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi
 fi

From 0e71eb069a797671b7e98bd5297a134c980f4b42 Mon Sep 17 00:00:00 2001
From: misterg <misterg@google.com>
Date: Tue, 9 Oct 2018 16:57:30 -0400
Subject: [PATCH 3/8] Internal Change

PiperOrigin-RevId: 216417182
---
 googlemock/Makefile.am      | 224 ---------------
 googlemock/test/BUILD.bazel | 123 ---------
 googletest/Makefile.am      | 336 -----------------------
 googletest/test/BUILD.bazel | 524 ------------------------------------
 4 files changed, 1207 deletions(-)
 delete mode 100644 googlemock/Makefile.am
 delete mode 100644 googlemock/test/BUILD.bazel
 delete mode 100644 googletest/Makefile.am
 delete mode 100644 googletest/test/BUILD.bazel

diff --git a/googlemock/Makefile.am b/googlemock/Makefile.am
deleted file mode 100644
index 9adbc516..00000000
--- a/googlemock/Makefile.am
+++ /dev/null
@@ -1,224 +0,0 @@
-# Automake file
-
-# Nonstandard package files for distribution.
-EXTRA_DIST = LICENSE
-
-# We may need to build our internally packaged gtest. If so, it will be
-# included in the 'subdirs' variable.
-SUBDIRS = $(subdirs)
-
-# This is generated by the configure script, so clean it for distribution.
-DISTCLEANFILES = scripts/gmock-config
-
-# We define the global AM_CPPFLAGS as everything we compile includes from these
-# directories.
-AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
-
-# Modifies compiler and linker flags for pthreads compatibility.
-if HAVE_PTHREADS
-  AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
-  AM_LIBS = @PTHREAD_LIBS@
-endif
-
-# Build rules for libraries.
-lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
-
-lib_libgmock_la_SOURCES = src/gmock-all.cc
-
-pkginclude_HEADERS = \
-  include/gmock/gmock-actions.h \
-  include/gmock/gmock-cardinalities.h \
-  include/gmock/gmock-generated-actions.h \
-  include/gmock/gmock-generated-function-mockers.h \
-  include/gmock/gmock-generated-matchers.h \
-  include/gmock/gmock-generated-nice-strict.h \
-  include/gmock/gmock-matchers.h \
-  include/gmock/gmock-more-actions.h \
-  include/gmock/gmock-more-matchers.h \
-  include/gmock/gmock-spec-builders.h \
-  include/gmock/gmock.h
-
-pkginclude_internaldir = $(pkgincludedir)/internal
-pkginclude_internal_HEADERS = \
-  include/gmock/internal/gmock-generated-internal-utils.h \
-  include/gmock/internal/gmock-internal-utils.h \
-  include/gmock/internal/gmock-port.h \
-  include/gmock/internal/custom/gmock-generated-actions.h \
-  include/gmock/internal/custom/gmock-matchers.h \
-  include/gmock/internal/custom/gmock-port.h
-
-lib_libgmock_main_la_SOURCES = src/gmock_main.cc
-lib_libgmock_main_la_LIBADD = lib/libgmock.la
-
-# Build rules for tests. Automake's naming for some of these variables isn't
-# terribly obvious, so this is a brief reference:
-#
-# TESTS -- Programs run automatically by "make check"
-# check_PROGRAMS -- Programs built by "make check" but not necessarily run
-
-TESTS=
-check_PROGRAMS=
-AM_LDFLAGS = $(GTEST_LDFLAGS)
-
-# This exercises all major components of Google Mock.  It also
-# verifies that libgmock works.
-TESTS += test/gmock-spec-builders_test
-check_PROGRAMS += test/gmock-spec-builders_test
-test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc
-test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la
-
-# This tests using Google Mock in multiple translation units.  It also
-# verifies that libgmock_main and libgmock work.
-TESTS += test/gmock_link_test
-check_PROGRAMS += test/gmock_link_test
-test_gmock_link_test_SOURCES = \
-  test/gmock_link2_test.cc \
-  test/gmock_link_test.cc \
-  test/gmock_link_test.h
-test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la  lib/libgmock.la
-
-if HAVE_PYTHON
-  # Tests that fused gmock files compile and work.
-  TESTS += test/gmock_fused_test
-  check_PROGRAMS += test/gmock_fused_test
-  test_gmock_fused_test_SOURCES = \
-    fused-src/gmock-gtest-all.cc \
-    fused-src/gmock/gmock.h \
-    fused-src/gmock_main.cc \
-    fused-src/gtest/gtest.h \
-    test/gmock_test.cc
-  test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
-endif
-
-# Google Mock source files that we don't compile directly.
-GMOCK_SOURCE_INGLUDES = \
-  src/gmock-cardinalities.cc \
-  src/gmock-internal-utils.cc \
-  src/gmock-matchers.cc \
-  src/gmock-spec-builders.cc \
-  src/gmock.cc
-
-EXTRA_DIST += $(GMOCK_SOURCE_INGLUDES)
-
-# C++ tests that we don't compile using autotools.
-EXTRA_DIST += \
-  test/gmock-actions_test.cc \
-  test/gmock_all_test.cc \
-  test/gmock-cardinalities_test.cc \
-  test/gmock_ex_test.cc \
-  test/gmock-generated-actions_test.cc \
-  test/gmock-generated-function-mockers_test.cc \
-  test/gmock-generated-internal-utils_test.cc \
-  test/gmock-generated-matchers_test.cc \
-  test/gmock-internal-utils_test.cc \
-  test/gmock-matchers_test.cc \
-  test/gmock-more-actions_test.cc \
-  test/gmock-nice-strict_test.cc \
-  test/gmock-port_test.cc \
-  test/gmock_stress_test.cc
-
-# Python tests, which we don't run using autotools.
-EXTRA_DIST += \
-  test/gmock_leak_test.py \
-  test/gmock_leak_test_.cc \
-  test/gmock_output_test.py \
-  test/gmock_output_test_.cc \
-  test/gmock_output_test_golden.txt \
-  test/gmock_test_utils.py
-
-# Nonstandard package files for distribution.
-EXTRA_DIST += \
-  CHANGES \
-  CONTRIBUTORS \
-  make/Makefile
-
-# Pump scripts for generating Google Mock headers.
-# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
-EXTRA_DIST += \
-  include/gmock/gmock-generated-actions.h.pump \
-  include/gmock/gmock-generated-function-mockers.h.pump \
-  include/gmock/gmock-generated-matchers.h.pump \
-  include/gmock/gmock-generated-nice-strict.h.pump \
-  include/gmock/internal/gmock-generated-internal-utils.h.pump \
-  include/gmock/internal/custom/gmock-generated-actions.h.pump
-
-# Script for fusing Google Mock and Google Test source files.
-EXTRA_DIST += scripts/fuse_gmock_files.py
-
-# The Google Mock Generator tool from the cppclean project.
-EXTRA_DIST += \
-  scripts/generator/LICENSE \
-  scripts/generator/README \
-  scripts/generator/README.cppclean \
-  scripts/generator/cpp/__init__.py \
-  scripts/generator/cpp/ast.py \
-  scripts/generator/cpp/gmock_class.py \
-  scripts/generator/cpp/keywords.py \
-  scripts/generator/cpp/tokenize.py \
-  scripts/generator/cpp/utils.py \
-  scripts/generator/gmock_gen.py
-
-# Script for diagnosing compiler errors in programs that use Google
-# Mock.
-EXTRA_DIST += scripts/gmock_doctor.py
-
-# CMake scripts.
-EXTRA_DIST += \
-  CMakeLists.txt
-
-# Microsoft Visual Studio 2005 projects.
-EXTRA_DIST += \
-  msvc/2005/gmock.sln \
-  msvc/2005/gmock.vcproj \
-  msvc/2005/gmock_config.vsprops \
-  msvc/2005/gmock_main.vcproj \
-  msvc/2005/gmock_test.vcproj
-
-# Microsoft Visual Studio 2010 projects.
-EXTRA_DIST += \
-  msvc/2010/gmock.sln \
-  msvc/2010/gmock.vcxproj \
-  msvc/2010/gmock_config.props \
-  msvc/2010/gmock_main.vcxproj \
-  msvc/2010/gmock_test.vcxproj
-
-if HAVE_PYTHON
-# gmock_test.cc does not really depend on files generated by the
-# fused-gmock-internal rule.  However, gmock_test.o does, and it is
-# important to include test/gmock_test.cc as part of this rule in order to
-# prevent compiling gmock_test.o until all dependent files have been
-# generated.
-$(test_gmock_fused_test_SOURCES): fused-gmock-internal
-
-# TODO(vladl@google.com): Find a way to add Google Tests's sources here.
-fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
-                      $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
-                      $(lib_libgmock_main_la_SOURCES) \
-                      scripts/fuse_gmock_files.py
-	mkdir -p "$(srcdir)/fused-src"
-	chmod -R u+w "$(srcdir)/fused-src"
-	rm -f "$(srcdir)/fused-src/gtest/gtest.h"
-	rm -f "$(srcdir)/fused-src/gmock/gmock.h"
-	rm -f "$(srcdir)/fused-src/gmock-gtest-all.cc"
-	"$(srcdir)/scripts/fuse_gmock_files.py" "$(srcdir)/fused-src"
-	cp -f "$(srcdir)/src/gmock_main.cc" "$(srcdir)/fused-src"
-
-maintainer-clean-local:
-	rm -rf "$(srcdir)/fused-src"
-endif
-
-# Death tests may produce core dumps in the build directory. In case
-# this happens, clean them to keep distcleancheck happy.
-CLEANFILES = core
-
-# Disables 'make install' as installing a compiled version of Google
-# Mock can lead to undefined behavior due to violation of the
-# One-Definition Rule.
-
-install-exec-local:
-	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
-	false
-
-install-data-local:
-	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
-	false
diff --git a/googlemock/test/BUILD.bazel b/googlemock/test/BUILD.bazel
deleted file mode 100644
index 0fe72a67..00000000
--- a/googlemock/test/BUILD.bazel
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 2017 Google Inc.
-# All Rights Reserved.
-#
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Author: misterg@google.com (Gennadiy Civil)
-#
-#   Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
-
-licenses(["notice"])
-
-""" gmock own tests """
-
-cc_test(
-    name = "gmock_all_test",
-    size = "small",
-    srcs = glob(
-        include = [
-            "gmock-*.cc",
-        ],
-    ),
-    linkopts = select({
-        "//:windows": [],
-        "//:windows_msvc": [],
-        "//conditions:default": [
-            "-pthread",
-        ],
-    }),
-    deps = ["//:gtest"],
-)
-
-#  Py tests
-
-py_library(
-    name = "gmock_test_utils",
-    testonly = 1,
-    srcs = ["gmock_test_utils.py"],
-)
-
-cc_binary(
-    name = "gmock_leak_test_",
-    testonly = 1,
-    srcs = ["gmock_leak_test_.cc"],
-    deps = [
-        "//:gtest_main",
-    ],
-)
-
-py_test(
-    name = "gmock_leak_test",
-    size = "medium",
-    srcs = ["gmock_leak_test.py"],
-    data = [
-        ":gmock_leak_test_",
-        ":gmock_test_utils",
-    ],
-)
-
-cc_test(
-    name = "gmock_link_test",
-    size = "small",
-    srcs = [
-        "gmock_link2_test.cc",
-        "gmock_link_test.cc",
-        "gmock_link_test.h",
-    ],
-    deps = [
-        "//:gtest_main",
-    ],
-)
-
-cc_binary(
-    name = "gmock_output_test_",
-    srcs = ["gmock_output_test_.cc"],
-    deps = [
-        "//:gtest",
-    ],
-)
-
-py_test(
-    name = "gmock_output_test",
-    size = "medium",
-    srcs = ["gmock_output_test.py"],
-    data = [
-        ":gmock_output_test_",
-        ":gmock_output_test_golden.txt",
-    ],
-    deps = [":gmock_test_utils"],
-)
-
-cc_test(
-    name = "gmock_test",
-    size = "small",
-    srcs = ["gmock_test.cc"],
-    deps = [
-        "//:gtest_main",
-    ],
-)
diff --git a/googletest/Makefile.am b/googletest/Makefile.am
deleted file mode 100644
index 543b36a0..00000000
--- a/googletest/Makefile.am
+++ /dev/null
@@ -1,336 +0,0 @@
-# Automake file
-
-ACLOCAL_AMFLAGS = -I m4
-
-# Nonstandard package files for distribution
-EXTRA_DIST = \
-  CHANGES \
-  CONTRIBUTORS \
-  LICENSE \
-  include/gtest/gtest-param-test.h.pump \
-  include/gtest/internal/gtest-param-util-generated.h.pump \
-  include/gtest/internal/gtest-type-util.h.pump \
-  make/Makefile \
-  scripts/fuse_gtest_files.py \
-  scripts/gen_gtest_pred_impl.py \
-  scripts/pump.py \
-  scripts/test/Makefile
-
-# gtest source files that we don't compile directly.  They are
-# #included by gtest-all.cc.
-GTEST_SRC = \
-  src/gtest-death-test.cc \
-  src/gtest-filepath.cc \
-  src/gtest-internal-inl.h \
-  src/gtest-port.cc \
-  src/gtest-printers.cc \
-  src/gtest-test-part.cc \
-  src/gtest-typed-test.cc \
-  src/gtest.cc
-
-EXTRA_DIST += $(GTEST_SRC)
-
-# Sample files that we don't compile.
-EXTRA_DIST += \
-  samples/prime_tables.h \
-  samples/sample1_unittest.cc \
-  samples/sample2_unittest.cc \
-  samples/sample3_unittest.cc \
-  samples/sample4_unittest.cc \
-  samples/sample5_unittest.cc \
-  samples/sample6_unittest.cc \
-  samples/sample7_unittest.cc \
-  samples/sample8_unittest.cc \
-  samples/sample9_unittest.cc
-
-# C++ test files that we don't compile directly.
-EXTRA_DIST += \
-  test/gtest-death-test_ex_test.cc \
-  test/gtest-death-test_test.cc \
-  test/gtest-filepath_test.cc \
-  test/gtest-linked_ptr_test.cc \
-  test/gtest-listener_test.cc \
-  test/gtest-message_test.cc \
-  test/gtest-options_test.cc \
-  test/googletest-param-test2-test.cc \
-  test/googletest-param-test2-test.cc \
-  test/googletest-param-test-test.cc \
-  test/googletest-param-test-test.cc \
-  test/gtest-param-test_test.h \
-  test/gtest-port_test.cc \
-  test/gtest_premature_exit_test.cc \
-  test/gtest-printers_test.cc \
-  test/gtest-test-part_test.cc \
-  test/gtest-typed-test2_test.cc \
-  test/gtest-typed-test_test.cc \
-  test/gtest-typed-test_test.h \
-  test/gtest-unittest-api_test.cc \
-  test/googletest-break-on-failure-unittest_.cc \
-  test/googletest-catch-exceptions-test_.cc \
-  test/googletest-color-test_.cc \
-  test/googletest-env-var-test_.cc \
-  test/gtest_environment_test.cc \
-  test/googletest-filter-unittest_.cc \
-  test/gtest_help_test_.cc \
-  test/googletest-list-tests-unittest_.cc \
-  test/gtest_main_unittest.cc \
-  test/gtest_no_test_unittest.cc \
-  test/googletest-output-test_.cc \
-  test/gtest_pred_impl_unittest.cc \
-  test/gtest_prod_test.cc \
-  test/gtest_repeat_test.cc \
-  test/googletest-shuffle-test_.cc \
-  test/gtest_sole_header_test.cc \
-  test/gtest_stress_test.cc \
-  test/gtest_throw_on_failure_ex_test.cc \
-  test/googletest-throw-on-failure-test_.cc \
-  test/googletest-uninitialized-test_.cc \
-  test/gtest_unittest.cc \
-  test/gtest_unittest.cc \
-  test/gtest_xml_outfile1_test_.cc \
-  test/gtest_xml_outfile2_test_.cc \
-  test/gtest_xml_output_unittest_.cc \
-  test/production.cc \
-  test/production.h
-
-# Python tests that we don't run.
-EXTRA_DIST += \
-  test/googletest-break-on-failure-unittest.py \
-  test/googletest-catch-exceptions-test.py \
-  test/googletest-color-test.py \
-  test/googletest-env-var-test.py \
-  test/googletest-filter-unittest.py \
-  test/gtest_help_test.py \
-  test/googletest-list-tests-unittest.py \
-  test/googletest-output-test.py \
-  test/googletest-output-test_golden_lin.txt \
-  test/googletest-shuffle-test.py \
-  test/gtest_test_utils.py \
-  test/googletest-throw-on-failure-test.py \
-  test/googletest-uninitialized-test.py \
-  test/gtest_xml_outfiles_test.py \
-  test/gtest_xml_output_unittest.py \
-  test/gtest_xml_test_utils.py
-
-# CMake script
-EXTRA_DIST += \
-  CMakeLists.txt \
-  cmake/internal_utils.cmake
-
-# MSVC project files
-EXTRA_DIST += \
-  msvc/2010/gtest-md.sln \
-  msvc/2010/gtest-md.vcxproj \
-  msvc/2010/gtest.sln \
-  msvc/2010/gtest.vcxproj \
-  msvc/2010/gtest_main-md.vcxproj \
-  msvc/2010/gtest_main.vcxproj \
-  msvc/2010/gtest_prod_test-md.vcxproj \
-  msvc/2010/gtest_prod_test.vcxproj \
-  msvc/2010/gtest_unittest-md.vcxproj \
-  msvc/2010/gtest_unittest.vcxproj
-
-# xcode project files
-EXTRA_DIST += \
-  xcode/Config/DebugProject.xcconfig \
-  xcode/Config/FrameworkTarget.xcconfig \
-  xcode/Config/General.xcconfig \
-  xcode/Config/ReleaseProject.xcconfig \
-  xcode/Config/StaticLibraryTarget.xcconfig \
-  xcode/Config/TestTarget.xcconfig \
-  xcode/Resources/Info.plist \
-  xcode/Scripts/runtests.sh \
-  xcode/Scripts/versiongenerate.py \
-  xcode/gtest.xcodeproj/project.pbxproj
-
-# xcode sample files
-EXTRA_DIST += \
-  xcode/Samples/FrameworkSample/Info.plist \
-  xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj \
-  xcode/Samples/FrameworkSample/runtests.sh \
-  xcode/Samples/FrameworkSample/widget.cc \
-  xcode/Samples/FrameworkSample/widget.h \
-  xcode/Samples/FrameworkSample/widget_test.cc
-
-# C++Builder project files
-EXTRA_DIST += \
-  codegear/gtest.cbproj \
-  codegear/gtest.groupproj \
-  codegear/gtest_all.cc \
-  codegear/gtest_link.cc \
-  codegear/gtest_main.cbproj \
-  codegear/gtest_unittest.cbproj
-
-# Distribute and install M4 macro
-m4datadir = $(datadir)/aclocal
-m4data_DATA = m4/gtest.m4
-EXTRA_DIST += $(m4data_DATA)
-
-# We define the global AM_CPPFLAGS as everything we compile includes from these
-# directories.
-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
-
-# Modifies compiler and linker flags for pthreads compatibility.
-if HAVE_PTHREADS
-  AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
-  AM_LIBS = @PTHREAD_LIBS@
-else
-  AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
-endif
-
-# Build rules for libraries.
-lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
-
-lib_libgtest_la_SOURCES = src/gtest-all.cc
-
-pkginclude_HEADERS = \
-  include/gtest/gtest-death-test.h \
-  include/gtest/gtest-message.h \
-  include/gtest/gtest-param-test.h \
-  include/gtest/gtest-printers.h \
-  include/gtest/gtest-spi.h \
-  include/gtest/gtest-test-part.h \
-  include/gtest/gtest-typed-test.h \
-  include/gtest/gtest.h \
-  include/gtest/gtest_pred_impl.h \
-  include/gtest/gtest_prod.h
-
-pkginclude_internaldir = $(pkgincludedir)/internal
-pkginclude_internal_HEADERS = \
-  include/gtest/internal/gtest-death-test-internal.h \
-  include/gtest/internal/gtest-filepath.h \
-  include/gtest/internal/gtest-internal.h \
-  include/gtest/internal/gtest-linked_ptr.h \
-  include/gtest/internal/gtest-param-util-generated.h \
-  include/gtest/internal/gtest-param-util.h \
-  include/gtest/internal/gtest-port.h \
-  include/gtest/internal/gtest-port-arch.h \
-  include/gtest/internal/gtest-string.h \
-  include/gtest/internal/gtest-type-util.h \
-  include/gtest/internal/custom/gtest.h \
-  include/gtest/internal/custom/gtest-port.h \
-  include/gtest/internal/custom/gtest-printers.h
-
-lib_libgtest_main_la_SOURCES = src/gtest_main.cc
-lib_libgtest_main_la_LIBADD = lib/libgtest.la
-
-# Build rules for samples and tests. Automake's naming for some of
-# these variables isn't terribly obvious, so this is a brief
-# reference:
-#
-# TESTS -- Programs run automatically by "make check"
-# check_PROGRAMS -- Programs built by "make check" but not necessarily run
-
-TESTS=
-TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
-                    GTEST_BUILD_DIR="$(top_builddir)/test"
-check_PROGRAMS=
-
-# A simple sample on using gtest.
-TESTS += samples/sample1_unittest \
-    samples/sample2_unittest \
-    samples/sample3_unittest \
-    samples/sample4_unittest \
-    samples/sample5_unittest \
-    samples/sample6_unittest \
-    samples/sample7_unittest \
-    samples/sample8_unittest \
-    samples/sample9_unittest \
-    samples/sample10_unittest
-check_PROGRAMS += samples/sample1_unittest \
-    samples/sample2_unittest \
-    samples/sample3_unittest \
-    samples/sample4_unittest \
-    samples/sample5_unittest \
-    samples/sample6_unittest \
-    samples/sample7_unittest \
-    samples/sample8_unittest \
-    samples/sample9_unittest \
-    samples/sample10_unittest
-
-samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc samples/sample1.cc
-samples_sample1_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc samples/sample2.cc
-samples_sample2_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
-samples_sample3_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc samples/sample4.cc
-samples_sample4_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc samples/sample1.cc
-samples_sample5_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample6_unittest_SOURCES = samples/sample6_unittest.cc
-samples_sample6_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample7_unittest_SOURCES = samples/sample7_unittest.cc
-samples_sample7_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-samples_sample8_unittest_SOURCES = samples/sample8_unittest.cc
-samples_sample8_unittest_LDADD = lib/libgtest_main.la \
-                                 lib/libgtest.la
-
-# Also verify that libgtest works by itself.
-samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc
-samples_sample9_unittest_LDADD = lib/libgtest.la
-samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
-samples_sample10_unittest_LDADD = lib/libgtest.la
-
-# This tests most constructs of gtest and verifies that libgtest_main
-# and libgtest work.
-TESTS += test/gtest_all_test
-check_PROGRAMS += test/gtest_all_test
-test_gtest_all_test_SOURCES = test/gtest_all_test.cc
-test_gtest_all_test_LDADD = lib/libgtest_main.la \
-                            lib/libgtest.la
-
-# Tests that fused gtest files compile and work.
-FUSED_GTEST_SRC = \
-  fused-src/gtest/gtest-all.cc \
-  fused-src/gtest/gtest.h \
-  fused-src/gtest/gtest_main.cc
-
-if HAVE_PYTHON
-TESTS += test/fused_gtest_test
-check_PROGRAMS += test/fused_gtest_test
-test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
-                                samples/sample1.cc samples/sample1_unittest.cc
-test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
-
-# Build rules for putting fused Google Test files into the distribution
-# package. The user can also create those files by manually running
-# scripts/fuse_gtest_files.py.
-$(test_fused_gtest_test_SOURCES): fused-gtest
-
-fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
-             $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
-             scripts/fuse_gtest_files.py
-	mkdir -p "$(srcdir)/fused-src"
-	chmod -R u+w "$(srcdir)/fused-src"
-	rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
-	rm -f "$(srcdir)/fused-src/gtest/gtest.h"
-	"$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
-	cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
-
-maintainer-clean-local:
-	rm -rf "$(srcdir)/fused-src"
-endif
-
-# Death tests may produce core dumps in the build directory. In case
-# this happens, clean them to keep distcleancheck happy.
-CLEANFILES = core
-
-# Disables 'make install' as installing a compiled version of Google
-# Test can lead to undefined behavior due to violation of the
-# One-Definition Rule.
-
-install-exec-local:
-	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
-	false
-
-install-data-local:
-	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
-	false
diff --git a/googletest/test/BUILD.bazel b/googletest/test/BUILD.bazel
deleted file mode 100644
index ed599203..00000000
--- a/googletest/test/BUILD.bazel
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 2017 Google Inc.
-# All Rights Reserved.
-#
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Author: misterg@google.com (Gennadiy Civil)
-#
-# Bazel BUILD for The Google C++ Testing Framework (Google Test)
-
-licenses(["notice"])
-
-config_setting(
-    name = "windows",
-    values = {"cpu": "x64_windows"},
-)
-
-config_setting(
-    name = "windows_msvc",
-    values = {"cpu": "x64_windows_msvc"},
-)
-
-config_setting(
-    name = "has_absl",
-    values = {"define": "absl=1"},
-)
-
-#on windows exclude gtest-tuple.h
-cc_test(
-    name = "gtest_all_test",
-    size = "small",
-    srcs = glob(
-        include = [
-            "gtest-*.cc",
-            "googletest-*.cc",
-            "*.h",
-            "googletest/include/gtest/**/*.h",
-        ],
-        exclude = [
-            "gtest-unittest-api_test.cc",
-            "googletest/src/gtest-all.cc",
-            "gtest_all_test.cc",
-            "gtest-death-test_ex_test.cc",
-            "gtest-listener_test.cc",
-            "gtest-unittest-api_test.cc",
-            "googletest-param-test-test.cc",
-            "googletest-catch-exceptions-test_.cc",
-            "googletest-color-test_.cc",
-            "googletest-env-var-test_.cc",
-            "googletest-filter-unittest_.cc",
-            "googletest-break-on-failure-unittest_.cc",
-             "googletest-listener-test.cc",
-             "googletest-output-test_.cc",
-             "googletest-list-tests-unittest_.cc",
-             "googletest-shuffle-test_.cc",
-             "googletest-uninitialized-test_.cc",
-             "googletest-death-test_ex_test.cc",
-             "googletest-param-test-test",
-             "googletest-throw-on-failure-test_.cc",
-             "googletest-param-test-invalid-name1-test_.cc",
-             "googletest-param-test-invalid-name2-test_.cc",
-
-        ],
-    ) + select({
-        "//:windows": [],
-        "//:windows_msvc": [],
-        "//conditions:default": [],
-    }),
-    copts = select({
-        "//:windows": ["-DGTEST_USE_OWN_TR1_TUPLE=0"],
-        "//:windows_msvc": ["-DGTEST_USE_OWN_TR1_TUPLE=0"],
-        "//conditions:default": ["-DGTEST_USE_OWN_TR1_TUPLE=1"],
-    }),
-    includes = [
-        "googletest",
-        "googletest/include",
-        "googletest/include/internal",
-        "googletest/test",
-    ],
-    linkopts = select({
-        "//:windows": [],
-        "//:windows_msvc": [],
-        "//conditions:default": [
-            "-pthread",
-        ],
-    }),
-    deps = ["//:gtest_main"],
-)
-
-
-# Tests death tests.
-cc_test(
-    name = "googletest-death-test-test",
-    size = "medium",
-    srcs = ["googletest-death-test-test.cc"],
-    deps = ["//:gtest_main"],
-)
-
-cc_test(
-    name = "gtest_test_macro_stack_footprint_test",
-    size = "small",
-    srcs = ["gtest_test_macro_stack_footprint_test.cc"],
-    deps = ["//:gtest"],
-)
-
-#These googletest tests have their own main()
-cc_test(
-    name = "googletest-listener-test",
-    size = "small",
-    srcs = ["googletest-listener-test.cc"],
-    deps = ["//:gtest_main"],
-)
-
-cc_test(
-    name = "gtest-unittest-api_test",
-    size = "small",
-    srcs = [
-        "gtest-unittest-api_test.cc",
-    ],
-    deps = [
-        "//:gtest",
-    ],
-)
-
-cc_test(
-    name = "googletest-param-test-test",
-    size = "small",
-    srcs = [
-        "googletest-param-test-test.cc",
-        "googletest-param-test-test.h",
-        "googletest-param-test2-test.cc",
-    ],
-    deps = ["//:gtest"],
-)
-
-cc_test(
-    name = "gtest_unittest",
-    size = "small",
-    srcs = ["gtest_unittest.cc"],
-    args = ["--heap_check=strict"],
-    shard_count = 2,
-    deps = ["//:gtest_main"],
-)
-
-#  Py tests
-
-py_library(
-    name = "gtest_test_utils",
-    testonly = 1,
-    srcs = ["gtest_test_utils.py"],
-)
-
-cc_binary(
-    name = "gtest_help_test_",
-    testonly = 1,
-    srcs = ["gtest_help_test_.cc"],
-    deps = ["//:gtest_main"],
-)
-
-py_test(
-    name = "gtest_help_test",
-    size = "small",
-    srcs = ["gtest_help_test.py"],
-    data = [":gtest_help_test_"],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-output-test_",
-    testonly = 1,
-    srcs = ["googletest-output-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-
-py_test(
-    name = "googletest-output-test",
-    size = "small",
-    srcs = ["googletest-output-test.py"],
-    args = select({
-        ":has_absl": [],
-        "//conditions:default": ["--no_stacktrace_support"],
-    }),
-    data = [
-        "googletest-output-test-golden-lin.txt",
-        ":googletest-output-test_",
-    ],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-color-test_",
-    testonly = 1,
-    srcs = ["googletest-color-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-color-test",
-    size = "small",
-    srcs = ["googletest-color-test.py"],
-    data = [":googletest-color-test_"],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-env-var-test_",
-    testonly = 1,
-    srcs = ["googletest-env-var-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-env-var-test",
-    size = "medium",
-    srcs = ["googletest-env-var-test.py"],
-    data = [":googletest-env-var-test_"],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-filter-unittest_",
-    testonly = 1,
-    srcs = ["googletest-filter-unittest_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-filter-unittest",
-    size = "medium",
-    srcs = ["googletest-filter-unittest.py"],
-    data = [":googletest-filter-unittest_"],
-    deps = [":gtest_test_utils"],
-)
-
-
-cc_binary(
-    name = "googletest-break-on-failure-unittest_",
-    testonly = 1,
-    srcs = ["googletest-break-on-failure-unittest_.cc"],
-    deps = ["//:gtest"],
-)
-
-
-
-py_test(
-    name = "googletest-break-on-failure-unittest",
-    size = "small",
-    srcs = ["googletest-break-on-failure-unittest.py"],
-    data = [":googletest-break-on-failure-unittest_"],
-    deps = [":gtest_test_utils"],
-)
-
-
-cc_test(
-    name = "gtest_assert_by_exception_test",
-    size = "small",
-    srcs = ["gtest_assert_by_exception_test.cc"],
-    deps = ["//:gtest"],
-)
-
-
-
-cc_binary(
-    name = "googletest-throw-on-failure-test_",
-    testonly = 1,
-    srcs = ["googletest-throw-on-failure-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-throw-on-failure-test",
-    size = "small",
-    srcs = ["googletest-throw-on-failure-test.py"],
-    data = [":googletest-throw-on-failure-test_"],
-    deps = [":gtest_test_utils"],
-)
-
-
-cc_binary(
-    name = "googletest-list-tests-unittest_",
-    testonly = 1,
-    srcs = ["googletest-list-tests-unittest_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-list-tests-unittest",
-    size = "small",
-    srcs = ["googletest-list-tests-unittest.py"],
-    data = [":googletest-list-tests-unittest_"],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-shuffle-test_",
-    srcs = ["googletest-shuffle-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-shuffle-test",
-    size = "small",
-    srcs = ["googletest-shuffle-test.py"],
-    data = [":googletest-shuffle-test_"],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-catch-exceptions-no-ex-test_",
-    testonly = 1,
-    srcs = ["googletest-catch-exceptions-test_.cc"],
-    deps = ["//:gtest_main"],
-)
-
-cc_binary(
-    name = "googletest-catch-exceptions-ex-test_",
-    testonly = 1,
-    srcs = ["googletest-catch-exceptions-test_.cc"],
-    copts = ["-fexceptions"],
-    deps = ["//:gtest_main"],
-)
-
-py_test(
-    name = "googletest-catch-exceptions-test",
-    size = "small",
-    srcs = ["googletest-catch-exceptions-test.py"],
-    data = [
-        ":googletest-catch-exceptions-ex-test_",
-        ":googletest-catch-exceptions-no-ex-test_",
-    ],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "gtest_xml_output_unittest_",
-    testonly = 1,
-    srcs = ["gtest_xml_output_unittest_.cc"],
-    deps = ["//:gtest"],
-)
-
-cc_test(
-    name = "gtest_no_test_unittest",
-    size = "small",
-    srcs = ["gtest_no_test_unittest.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "gtest_xml_output_unittest",
-    size = "small",
-    srcs = [
-        "gtest_xml_output_unittest.py",
-        "gtest_xml_test_utils.py",
-    ],
-    args = select({
-        ":has_absl": [],
-        "//conditions:default": ["--no_stacktrace_support"],
-    }),
-    data = [
-        # We invoke gtest_no_test_unittest to verify the XML output
-        # when the test program contains no test definition.
-        ":gtest_no_test_unittest",
-        ":gtest_xml_output_unittest_",
-    ],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "gtest_xml_outfile1_test_",
-    testonly = 1,
-    srcs = ["gtest_xml_outfile1_test_.cc"],
-    deps = ["//:gtest_main"],
-)
-
-cc_binary(
-    name = "gtest_xml_outfile2_test_",
-    testonly = 1,
-    srcs = ["gtest_xml_outfile2_test_.cc"],
-    deps = ["//:gtest_main"],
-)
-
-py_test(
-    name = "gtest_xml_outfiles_test",
-    size = "small",
-    srcs = [
-        "gtest_xml_outfiles_test.py",
-        "gtest_xml_test_utils.py",
-    ],
-    data = [
-        ":gtest_xml_outfile1_test_",
-        ":gtest_xml_outfile2_test_",
-    ],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "googletest-uninitialized-test_",
-    testonly = 1,
-    srcs = ["googletest-uninitialized-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-uninitialized-test",
-    size = "medium",
-    srcs = ["googletest-uninitialized-test.py"],
-    data = ["googletest-uninitialized-test_"],
-    deps = [":gtest_test_utils"],
-)
-
-cc_binary(
-    name = "gtest_testbridge_test_",
-    testonly = 1,
-    srcs = ["gtest_testbridge_test_.cc"],
-    deps = ["//:gtest_main"],
-)
-
-# Tests that filtering via testbridge works
-py_test(
-    name = "gtest_testbridge_test",
-    size = "small",
-    srcs = ["gtest_testbridge_test.py"],
-    data = [":gtest_testbridge_test_"],
-    deps = [":gtest_test_utils"],
-)
-
-
-py_test(
-    name = "googletest-json-outfiles-test",
-    size = "small",
-    srcs = [
-        "googletest-json-outfiles-test.py",
-        "gtest_json_test_utils.py",
-    ],
-    data = [
-        ":gtest_xml_outfile1_test_",
-        ":gtest_xml_outfile2_test_",
-    ],
-    deps = [":gtest_test_utils"],
-)
-
-py_test(
-    name = "googletest-json-output-unittest",
-    size = "medium",
-    srcs = [
-        "googletest-json-output-unittest.py",
-        "gtest_json_test_utils.py",
-    ],
-    data = [
-        # We invoke gtest_no_test_unittest to verify the JSON output
-        # when the test program contains no test definition.
-        ":gtest_no_test_unittest",
-        ":gtest_xml_output_unittest_",
-    ],
-    args = select({
-        ":has_absl": [],
-        "//conditions:default": ["--no_stacktrace_support"],
-    }),
-    deps = [":gtest_test_utils"],
-)
-# Verifies interaction of death tests and exceptions.
-cc_test(
-    name = "googletest-death-test_ex_catch_test",
-    size = "medium",
-    srcs = ["googletest-death-test_ex_test.cc"],
-    copts = ["-fexceptions"],
-    defines = ["GTEST_ENABLE_CATCH_EXCEPTIONS_=1"],
-    deps = ["//:gtest"],
-)
-
-cc_binary(
-    name = "googletest-param-test-invalid-name1-test_",
-    testonly = 1,
-    srcs = ["googletest-param-test-invalid-name1-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-cc_binary(
-    name = "googletest-param-test-invalid-name2-test_",
-    testonly = 1,
-    srcs = ["googletest-param-test-invalid-name2-test_.cc"],
-    deps = ["//:gtest"],
-)
-
-py_test(
-    name = "googletest-param-test-invalid-name1-test",
-    size = "small",
-    srcs = ["googletest-param-test-invalid-name1-test.py"],
-    data = [":googletest-param-test-invalid-name1-test_"],
-    deps = [":gtest_test_utils"],
-)
-
-py_test(
-    name = "googletest-param-test-invalid-name2-test",
-    size = "small",
-    srcs = ["googletest-param-test-invalid-name2-test.py"],
-    data = [":googletest-param-test-invalid-name2-test_"],
-    deps = [":gtest_test_utils"],
-)

From bc6a4ce380862ba274a3b7b2a33b295a858eb0a9 Mon Sep 17 00:00:00 2001
From: Abseil Team <absl-team@google.com>
Date: Tue, 9 Oct 2018 17:30:36 -0400
Subject: [PATCH 4/8] Project import generated by Copybara.

PiperOrigin-RevId: 216423319
---
 googlemock/Makefile.am      | 224 +++++++++++++++
 googlemock/test/BUILD.bazel | 123 +++++++++
 googletest/Makefile.am      | 336 +++++++++++++++++++++++
 googletest/test/BUILD.bazel | 524 ++++++++++++++++++++++++++++++++++++
 4 files changed, 1207 insertions(+)
 create mode 100644 googlemock/Makefile.am
 create mode 100644 googlemock/test/BUILD.bazel
 create mode 100644 googletest/Makefile.am
 create mode 100644 googletest/test/BUILD.bazel

diff --git a/googlemock/Makefile.am b/googlemock/Makefile.am
new file mode 100644
index 00000000..9adbc516
--- /dev/null
+++ b/googlemock/Makefile.am
@@ -0,0 +1,224 @@
+# Automake file
+
+# Nonstandard package files for distribution.
+EXTRA_DIST = LICENSE
+
+# We may need to build our internally packaged gtest. If so, it will be
+# included in the 'subdirs' variable.
+SUBDIRS = $(subdirs)
+
+# This is generated by the configure script, so clean it for distribution.
+DISTCLEANFILES = scripts/gmock-config
+
+# We define the global AM_CPPFLAGS as everything we compile includes from these
+# directories.
+AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include
+
+# Modifies compiler and linker flags for pthreads compatibility.
+if HAVE_PTHREADS
+  AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
+  AM_LIBS = @PTHREAD_LIBS@
+endif
+
+# Build rules for libraries.
+lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la
+
+lib_libgmock_la_SOURCES = src/gmock-all.cc
+
+pkginclude_HEADERS = \
+  include/gmock/gmock-actions.h \
+  include/gmock/gmock-cardinalities.h \
+  include/gmock/gmock-generated-actions.h \
+  include/gmock/gmock-generated-function-mockers.h \
+  include/gmock/gmock-generated-matchers.h \
+  include/gmock/gmock-generated-nice-strict.h \
+  include/gmock/gmock-matchers.h \
+  include/gmock/gmock-more-actions.h \
+  include/gmock/gmock-more-matchers.h \
+  include/gmock/gmock-spec-builders.h \
+  include/gmock/gmock.h
+
+pkginclude_internaldir = $(pkgincludedir)/internal
+pkginclude_internal_HEADERS = \
+  include/gmock/internal/gmock-generated-internal-utils.h \
+  include/gmock/internal/gmock-internal-utils.h \
+  include/gmock/internal/gmock-port.h \
+  include/gmock/internal/custom/gmock-generated-actions.h \
+  include/gmock/internal/custom/gmock-matchers.h \
+  include/gmock/internal/custom/gmock-port.h
+
+lib_libgmock_main_la_SOURCES = src/gmock_main.cc
+lib_libgmock_main_la_LIBADD = lib/libgmock.la
+
+# Build rules for tests. Automake's naming for some of these variables isn't
+# terribly obvious, so this is a brief reference:
+#
+# TESTS -- Programs run automatically by "make check"
+# check_PROGRAMS -- Programs built by "make check" but not necessarily run
+
+TESTS=
+check_PROGRAMS=
+AM_LDFLAGS = $(GTEST_LDFLAGS)
+
+# This exercises all major components of Google Mock.  It also
+# verifies that libgmock works.
+TESTS += test/gmock-spec-builders_test
+check_PROGRAMS += test/gmock-spec-builders_test
+test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc
+test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la
+
+# This tests using Google Mock in multiple translation units.  It also
+# verifies that libgmock_main and libgmock work.
+TESTS += test/gmock_link_test
+check_PROGRAMS += test/gmock_link_test
+test_gmock_link_test_SOURCES = \
+  test/gmock_link2_test.cc \
+  test/gmock_link_test.cc \
+  test/gmock_link_test.h
+test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la  lib/libgmock.la
+
+if HAVE_PYTHON
+  # Tests that fused gmock files compile and work.
+  TESTS += test/gmock_fused_test
+  check_PROGRAMS += test/gmock_fused_test
+  test_gmock_fused_test_SOURCES = \
+    fused-src/gmock-gtest-all.cc \
+    fused-src/gmock/gmock.h \
+    fused-src/gmock_main.cc \
+    fused-src/gtest/gtest.h \
+    test/gmock_test.cc
+  test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src"
+endif
+
+# Google Mock source files that we don't compile directly.
+GMOCK_SOURCE_INGLUDES = \
+  src/gmock-cardinalities.cc \
+  src/gmock-internal-utils.cc \
+  src/gmock-matchers.cc \
+  src/gmock-spec-builders.cc \
+  src/gmock.cc
+
+EXTRA_DIST += $(GMOCK_SOURCE_INGLUDES)
+
+# C++ tests that we don't compile using autotools.
+EXTRA_DIST += \
+  test/gmock-actions_test.cc \
+  test/gmock_all_test.cc \
+  test/gmock-cardinalities_test.cc \
+  test/gmock_ex_test.cc \
+  test/gmock-generated-actions_test.cc \
+  test/gmock-generated-function-mockers_test.cc \
+  test/gmock-generated-internal-utils_test.cc \
+  test/gmock-generated-matchers_test.cc \
+  test/gmock-internal-utils_test.cc \
+  test/gmock-matchers_test.cc \
+  test/gmock-more-actions_test.cc \
+  test/gmock-nice-strict_test.cc \
+  test/gmock-port_test.cc \
+  test/gmock_stress_test.cc
+
+# Python tests, which we don't run using autotools.
+EXTRA_DIST += \
+  test/gmock_leak_test.py \
+  test/gmock_leak_test_.cc \
+  test/gmock_output_test.py \
+  test/gmock_output_test_.cc \
+  test/gmock_output_test_golden.txt \
+  test/gmock_test_utils.py
+
+# Nonstandard package files for distribution.
+EXTRA_DIST += \
+  CHANGES \
+  CONTRIBUTORS \
+  make/Makefile
+
+# Pump scripts for generating Google Mock headers.
+# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
+EXTRA_DIST += \
+  include/gmock/gmock-generated-actions.h.pump \
+  include/gmock/gmock-generated-function-mockers.h.pump \
+  include/gmock/gmock-generated-matchers.h.pump \
+  include/gmock/gmock-generated-nice-strict.h.pump \
+  include/gmock/internal/gmock-generated-internal-utils.h.pump \
+  include/gmock/internal/custom/gmock-generated-actions.h.pump
+
+# Script for fusing Google Mock and Google Test source files.
+EXTRA_DIST += scripts/fuse_gmock_files.py
+
+# The Google Mock Generator tool from the cppclean project.
+EXTRA_DIST += \
+  scripts/generator/LICENSE \
+  scripts/generator/README \
+  scripts/generator/README.cppclean \
+  scripts/generator/cpp/__init__.py \
+  scripts/generator/cpp/ast.py \
+  scripts/generator/cpp/gmock_class.py \
+  scripts/generator/cpp/keywords.py \
+  scripts/generator/cpp/tokenize.py \
+  scripts/generator/cpp/utils.py \
+  scripts/generator/gmock_gen.py
+
+# Script for diagnosing compiler errors in programs that use Google
+# Mock.
+EXTRA_DIST += scripts/gmock_doctor.py
+
+# CMake scripts.
+EXTRA_DIST += \
+  CMakeLists.txt
+
+# Microsoft Visual Studio 2005 projects.
+EXTRA_DIST += \
+  msvc/2005/gmock.sln \
+  msvc/2005/gmock.vcproj \
+  msvc/2005/gmock_config.vsprops \
+  msvc/2005/gmock_main.vcproj \
+  msvc/2005/gmock_test.vcproj
+
+# Microsoft Visual Studio 2010 projects.
+EXTRA_DIST += \
+  msvc/2010/gmock.sln \
+  msvc/2010/gmock.vcxproj \
+  msvc/2010/gmock_config.props \
+  msvc/2010/gmock_main.vcxproj \
+  msvc/2010/gmock_test.vcxproj
+
+if HAVE_PYTHON
+# gmock_test.cc does not really depend on files generated by the
+# fused-gmock-internal rule.  However, gmock_test.o does, and it is
+# important to include test/gmock_test.cc as part of this rule in order to
+# prevent compiling gmock_test.o until all dependent files have been
+# generated.
+$(test_gmock_fused_test_SOURCES): fused-gmock-internal
+
+# TODO(vladl@google.com): Find a way to add Google Tests's sources here.
+fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
+                      $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \
+                      $(lib_libgmock_main_la_SOURCES) \
+                      scripts/fuse_gmock_files.py
+	mkdir -p "$(srcdir)/fused-src"
+	chmod -R u+w "$(srcdir)/fused-src"
+	rm -f "$(srcdir)/fused-src/gtest/gtest.h"
+	rm -f "$(srcdir)/fused-src/gmock/gmock.h"
+	rm -f "$(srcdir)/fused-src/gmock-gtest-all.cc"
+	"$(srcdir)/scripts/fuse_gmock_files.py" "$(srcdir)/fused-src"
+	cp -f "$(srcdir)/src/gmock_main.cc" "$(srcdir)/fused-src"
+
+maintainer-clean-local:
+	rm -rf "$(srcdir)/fused-src"
+endif
+
+# Death tests may produce core dumps in the build directory. In case
+# this happens, clean them to keep distcleancheck happy.
+CLEANFILES = core
+
+# Disables 'make install' as installing a compiled version of Google
+# Mock can lead to undefined behavior due to violation of the
+# One-Definition Rule.
+
+install-exec-local:
+	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+	false
+
+install-data-local:
+	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system."
+	false
diff --git a/googlemock/test/BUILD.bazel b/googlemock/test/BUILD.bazel
new file mode 100644
index 00000000..0fe72a67
--- /dev/null
+++ b/googlemock/test/BUILD.bazel
@@ -0,0 +1,123 @@
+# Copyright 2017 Google Inc.
+# All Rights Reserved.
+#
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Author: misterg@google.com (Gennadiy Civil)
+#
+#   Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
+
+licenses(["notice"])
+
+""" gmock own tests """
+
+cc_test(
+    name = "gmock_all_test",
+    size = "small",
+    srcs = glob(
+        include = [
+            "gmock-*.cc",
+        ],
+    ),
+    linkopts = select({
+        "//:windows": [],
+        "//:windows_msvc": [],
+        "//conditions:default": [
+            "-pthread",
+        ],
+    }),
+    deps = ["//:gtest"],
+)
+
+#  Py tests
+
+py_library(
+    name = "gmock_test_utils",
+    testonly = 1,
+    srcs = ["gmock_test_utils.py"],
+)
+
+cc_binary(
+    name = "gmock_leak_test_",
+    testonly = 1,
+    srcs = ["gmock_leak_test_.cc"],
+    deps = [
+        "//:gtest_main",
+    ],
+)
+
+py_test(
+    name = "gmock_leak_test",
+    size = "medium",
+    srcs = ["gmock_leak_test.py"],
+    data = [
+        ":gmock_leak_test_",
+        ":gmock_test_utils",
+    ],
+)
+
+cc_test(
+    name = "gmock_link_test",
+    size = "small",
+    srcs = [
+        "gmock_link2_test.cc",
+        "gmock_link_test.cc",
+        "gmock_link_test.h",
+    ],
+    deps = [
+        "//:gtest_main",
+    ],
+)
+
+cc_binary(
+    name = "gmock_output_test_",
+    srcs = ["gmock_output_test_.cc"],
+    deps = [
+        "//:gtest",
+    ],
+)
+
+py_test(
+    name = "gmock_output_test",
+    size = "medium",
+    srcs = ["gmock_output_test.py"],
+    data = [
+        ":gmock_output_test_",
+        ":gmock_output_test_golden.txt",
+    ],
+    deps = [":gmock_test_utils"],
+)
+
+cc_test(
+    name = "gmock_test",
+    size = "small",
+    srcs = ["gmock_test.cc"],
+    deps = [
+        "//:gtest_main",
+    ],
+)
diff --git a/googletest/Makefile.am b/googletest/Makefile.am
new file mode 100644
index 00000000..543b36a0
--- /dev/null
+++ b/googletest/Makefile.am
@@ -0,0 +1,336 @@
+# Automake file
+
+ACLOCAL_AMFLAGS = -I m4
+
+# Nonstandard package files for distribution
+EXTRA_DIST = \
+  CHANGES \
+  CONTRIBUTORS \
+  LICENSE \
+  include/gtest/gtest-param-test.h.pump \
+  include/gtest/internal/gtest-param-util-generated.h.pump \
+  include/gtest/internal/gtest-type-util.h.pump \
+  make/Makefile \
+  scripts/fuse_gtest_files.py \
+  scripts/gen_gtest_pred_impl.py \
+  scripts/pump.py \
+  scripts/test/Makefile
+
+# gtest source files that we don't compile directly.  They are
+# #included by gtest-all.cc.
+GTEST_SRC = \
+  src/gtest-death-test.cc \
+  src/gtest-filepath.cc \
+  src/gtest-internal-inl.h \
+  src/gtest-port.cc \
+  src/gtest-printers.cc \
+  src/gtest-test-part.cc \
+  src/gtest-typed-test.cc \
+  src/gtest.cc
+
+EXTRA_DIST += $(GTEST_SRC)
+
+# Sample files that we don't compile.
+EXTRA_DIST += \
+  samples/prime_tables.h \
+  samples/sample1_unittest.cc \
+  samples/sample2_unittest.cc \
+  samples/sample3_unittest.cc \
+  samples/sample4_unittest.cc \
+  samples/sample5_unittest.cc \
+  samples/sample6_unittest.cc \
+  samples/sample7_unittest.cc \
+  samples/sample8_unittest.cc \
+  samples/sample9_unittest.cc
+
+# C++ test files that we don't compile directly.
+EXTRA_DIST += \
+  test/gtest-death-test_ex_test.cc \
+  test/gtest-death-test_test.cc \
+  test/gtest-filepath_test.cc \
+  test/gtest-linked_ptr_test.cc \
+  test/gtest-listener_test.cc \
+  test/gtest-message_test.cc \
+  test/gtest-options_test.cc \
+  test/googletest-param-test2-test.cc \
+  test/googletest-param-test2-test.cc \
+  test/googletest-param-test-test.cc \
+  test/googletest-param-test-test.cc \
+  test/gtest-param-test_test.h \
+  test/gtest-port_test.cc \
+  test/gtest_premature_exit_test.cc \
+  test/gtest-printers_test.cc \
+  test/gtest-test-part_test.cc \
+  test/gtest-typed-test2_test.cc \
+  test/gtest-typed-test_test.cc \
+  test/gtest-typed-test_test.h \
+  test/gtest-unittest-api_test.cc \
+  test/googletest-break-on-failure-unittest_.cc \
+  test/googletest-catch-exceptions-test_.cc \
+  test/googletest-color-test_.cc \
+  test/googletest-env-var-test_.cc \
+  test/gtest_environment_test.cc \
+  test/googletest-filter-unittest_.cc \
+  test/gtest_help_test_.cc \
+  test/googletest-list-tests-unittest_.cc \
+  test/gtest_main_unittest.cc \
+  test/gtest_no_test_unittest.cc \
+  test/googletest-output-test_.cc \
+  test/gtest_pred_impl_unittest.cc \
+  test/gtest_prod_test.cc \
+  test/gtest_repeat_test.cc \
+  test/googletest-shuffle-test_.cc \
+  test/gtest_sole_header_test.cc \
+  test/gtest_stress_test.cc \
+  test/gtest_throw_on_failure_ex_test.cc \
+  test/googletest-throw-on-failure-test_.cc \
+  test/googletest-uninitialized-test_.cc \
+  test/gtest_unittest.cc \
+  test/gtest_unittest.cc \
+  test/gtest_xml_outfile1_test_.cc \
+  test/gtest_xml_outfile2_test_.cc \
+  test/gtest_xml_output_unittest_.cc \
+  test/production.cc \
+  test/production.h
+
+# Python tests that we don't run.
+EXTRA_DIST += \
+  test/googletest-break-on-failure-unittest.py \
+  test/googletest-catch-exceptions-test.py \
+  test/googletest-color-test.py \
+  test/googletest-env-var-test.py \
+  test/googletest-filter-unittest.py \
+  test/gtest_help_test.py \
+  test/googletest-list-tests-unittest.py \
+  test/googletest-output-test.py \
+  test/googletest-output-test_golden_lin.txt \
+  test/googletest-shuffle-test.py \
+  test/gtest_test_utils.py \
+  test/googletest-throw-on-failure-test.py \
+  test/googletest-uninitialized-test.py \
+  test/gtest_xml_outfiles_test.py \
+  test/gtest_xml_output_unittest.py \
+  test/gtest_xml_test_utils.py
+
+# CMake script
+EXTRA_DIST += \
+  CMakeLists.txt \
+  cmake/internal_utils.cmake
+
+# MSVC project files
+EXTRA_DIST += \
+  msvc/2010/gtest-md.sln \
+  msvc/2010/gtest-md.vcxproj \
+  msvc/2010/gtest.sln \
+  msvc/2010/gtest.vcxproj \
+  msvc/2010/gtest_main-md.vcxproj \
+  msvc/2010/gtest_main.vcxproj \
+  msvc/2010/gtest_prod_test-md.vcxproj \
+  msvc/2010/gtest_prod_test.vcxproj \
+  msvc/2010/gtest_unittest-md.vcxproj \
+  msvc/2010/gtest_unittest.vcxproj
+
+# xcode project files
+EXTRA_DIST += \
+  xcode/Config/DebugProject.xcconfig \
+  xcode/Config/FrameworkTarget.xcconfig \
+  xcode/Config/General.xcconfig \
+  xcode/Config/ReleaseProject.xcconfig \
+  xcode/Config/StaticLibraryTarget.xcconfig \
+  xcode/Config/TestTarget.xcconfig \
+  xcode/Resources/Info.plist \
+  xcode/Scripts/runtests.sh \
+  xcode/Scripts/versiongenerate.py \
+  xcode/gtest.xcodeproj/project.pbxproj
+
+# xcode sample files
+EXTRA_DIST += \
+  xcode/Samples/FrameworkSample/Info.plist \
+  xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj \
+  xcode/Samples/FrameworkSample/runtests.sh \
+  xcode/Samples/FrameworkSample/widget.cc \
+  xcode/Samples/FrameworkSample/widget.h \
+  xcode/Samples/FrameworkSample/widget_test.cc
+
+# C++Builder project files
+EXTRA_DIST += \
+  codegear/gtest.cbproj \
+  codegear/gtest.groupproj \
+  codegear/gtest_all.cc \
+  codegear/gtest_link.cc \
+  codegear/gtest_main.cbproj \
+  codegear/gtest_unittest.cbproj
+
+# Distribute and install M4 macro
+m4datadir = $(datadir)/aclocal
+m4data_DATA = m4/gtest.m4
+EXTRA_DIST += $(m4data_DATA)
+
+# We define the global AM_CPPFLAGS as everything we compile includes from these
+# directories.
+AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
+
+# Modifies compiler and linker flags for pthreads compatibility.
+if HAVE_PTHREADS
+  AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
+  AM_LIBS = @PTHREAD_LIBS@
+else
+  AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
+endif
+
+# Build rules for libraries.
+lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
+
+lib_libgtest_la_SOURCES = src/gtest-all.cc
+
+pkginclude_HEADERS = \
+  include/gtest/gtest-death-test.h \
+  include/gtest/gtest-message.h \
+  include/gtest/gtest-param-test.h \
+  include/gtest/gtest-printers.h \
+  include/gtest/gtest-spi.h \
+  include/gtest/gtest-test-part.h \
+  include/gtest/gtest-typed-test.h \
+  include/gtest/gtest.h \
+  include/gtest/gtest_pred_impl.h \
+  include/gtest/gtest_prod.h
+
+pkginclude_internaldir = $(pkgincludedir)/internal
+pkginclude_internal_HEADERS = \
+  include/gtest/internal/gtest-death-test-internal.h \
+  include/gtest/internal/gtest-filepath.h \
+  include/gtest/internal/gtest-internal.h \
+  include/gtest/internal/gtest-linked_ptr.h \
+  include/gtest/internal/gtest-param-util-generated.h \
+  include/gtest/internal/gtest-param-util.h \
+  include/gtest/internal/gtest-port.h \
+  include/gtest/internal/gtest-port-arch.h \
+  include/gtest/internal/gtest-string.h \
+  include/gtest/internal/gtest-type-util.h \
+  include/gtest/internal/custom/gtest.h \
+  include/gtest/internal/custom/gtest-port.h \
+  include/gtest/internal/custom/gtest-printers.h
+
+lib_libgtest_main_la_SOURCES = src/gtest_main.cc
+lib_libgtest_main_la_LIBADD = lib/libgtest.la
+
+# Build rules for samples and tests. Automake's naming for some of
+# these variables isn't terribly obvious, so this is a brief
+# reference:
+#
+# TESTS -- Programs run automatically by "make check"
+# check_PROGRAMS -- Programs built by "make check" but not necessarily run
+
+TESTS=
+TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
+                    GTEST_BUILD_DIR="$(top_builddir)/test"
+check_PROGRAMS=
+
+# A simple sample on using gtest.
+TESTS += samples/sample1_unittest \
+    samples/sample2_unittest \
+    samples/sample3_unittest \
+    samples/sample4_unittest \
+    samples/sample5_unittest \
+    samples/sample6_unittest \
+    samples/sample7_unittest \
+    samples/sample8_unittest \
+    samples/sample9_unittest \
+    samples/sample10_unittest
+check_PROGRAMS += samples/sample1_unittest \
+    samples/sample2_unittest \
+    samples/sample3_unittest \
+    samples/sample4_unittest \
+    samples/sample5_unittest \
+    samples/sample6_unittest \
+    samples/sample7_unittest \
+    samples/sample8_unittest \
+    samples/sample9_unittest \
+    samples/sample10_unittest
+
+samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc samples/sample1.cc
+samples_sample1_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc samples/sample2.cc
+samples_sample2_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
+samples_sample3_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc samples/sample4.cc
+samples_sample4_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc samples/sample1.cc
+samples_sample5_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample6_unittest_SOURCES = samples/sample6_unittest.cc
+samples_sample6_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample7_unittest_SOURCES = samples/sample7_unittest.cc
+samples_sample7_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+samples_sample8_unittest_SOURCES = samples/sample8_unittest.cc
+samples_sample8_unittest_LDADD = lib/libgtest_main.la \
+                                 lib/libgtest.la
+
+# Also verify that libgtest works by itself.
+samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc
+samples_sample9_unittest_LDADD = lib/libgtest.la
+samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
+samples_sample10_unittest_LDADD = lib/libgtest.la
+
+# This tests most constructs of gtest and verifies that libgtest_main
+# and libgtest work.
+TESTS += test/gtest_all_test
+check_PROGRAMS += test/gtest_all_test
+test_gtest_all_test_SOURCES = test/gtest_all_test.cc
+test_gtest_all_test_LDADD = lib/libgtest_main.la \
+                            lib/libgtest.la
+
+# Tests that fused gtest files compile and work.
+FUSED_GTEST_SRC = \
+  fused-src/gtest/gtest-all.cc \
+  fused-src/gtest/gtest.h \
+  fused-src/gtest/gtest_main.cc
+
+if HAVE_PYTHON
+TESTS += test/fused_gtest_test
+check_PROGRAMS += test/fused_gtest_test
+test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
+                                samples/sample1.cc samples/sample1_unittest.cc
+test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
+
+# Build rules for putting fused Google Test files into the distribution
+# package. The user can also create those files by manually running
+# scripts/fuse_gtest_files.py.
+$(test_fused_gtest_test_SOURCES): fused-gtest
+
+fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
+             $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
+             scripts/fuse_gtest_files.py
+	mkdir -p "$(srcdir)/fused-src"
+	chmod -R u+w "$(srcdir)/fused-src"
+	rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
+	rm -f "$(srcdir)/fused-src/gtest/gtest.h"
+	"$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
+	cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
+
+maintainer-clean-local:
+	rm -rf "$(srcdir)/fused-src"
+endif
+
+# Death tests may produce core dumps in the build directory. In case
+# this happens, clean them to keep distcleancheck happy.
+CLEANFILES = core
+
+# Disables 'make install' as installing a compiled version of Google
+# Test can lead to undefined behavior due to violation of the
+# One-Definition Rule.
+
+install-exec-local:
+	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
+	false
+
+install-data-local:
+	echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
+	false
diff --git a/googletest/test/BUILD.bazel b/googletest/test/BUILD.bazel
new file mode 100644
index 00000000..ed599203
--- /dev/null
+++ b/googletest/test/BUILD.bazel
@@ -0,0 +1,524 @@
+# Copyright 2017 Google Inc.
+# All Rights Reserved.
+#
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Author: misterg@google.com (Gennadiy Civil)
+#
+# Bazel BUILD for The Google C++ Testing Framework (Google Test)
+
+licenses(["notice"])
+
+config_setting(
+    name = "windows",
+    values = {"cpu": "x64_windows"},
+)
+
+config_setting(
+    name = "windows_msvc",
+    values = {"cpu": "x64_windows_msvc"},
+)
+
+config_setting(
+    name = "has_absl",
+    values = {"define": "absl=1"},
+)
+
+#on windows exclude gtest-tuple.h
+cc_test(
+    name = "gtest_all_test",
+    size = "small",
+    srcs = glob(
+        include = [
+            "gtest-*.cc",
+            "googletest-*.cc",
+            "*.h",
+            "googletest/include/gtest/**/*.h",
+        ],
+        exclude = [
+            "gtest-unittest-api_test.cc",
+            "googletest/src/gtest-all.cc",
+            "gtest_all_test.cc",
+            "gtest-death-test_ex_test.cc",
+            "gtest-listener_test.cc",
+            "gtest-unittest-api_test.cc",
+            "googletest-param-test-test.cc",
+            "googletest-catch-exceptions-test_.cc",
+            "googletest-color-test_.cc",
+            "googletest-env-var-test_.cc",
+            "googletest-filter-unittest_.cc",
+            "googletest-break-on-failure-unittest_.cc",
+             "googletest-listener-test.cc",
+             "googletest-output-test_.cc",
+             "googletest-list-tests-unittest_.cc",
+             "googletest-shuffle-test_.cc",
+             "googletest-uninitialized-test_.cc",
+             "googletest-death-test_ex_test.cc",
+             "googletest-param-test-test",
+             "googletest-throw-on-failure-test_.cc",
+             "googletest-param-test-invalid-name1-test_.cc",
+             "googletest-param-test-invalid-name2-test_.cc",
+
+        ],
+    ) + select({
+        "//:windows": [],
+        "//:windows_msvc": [],
+        "//conditions:default": [],
+    }),
+    copts = select({
+        "//:windows": ["-DGTEST_USE_OWN_TR1_TUPLE=0"],
+        "//:windows_msvc": ["-DGTEST_USE_OWN_TR1_TUPLE=0"],
+        "//conditions:default": ["-DGTEST_USE_OWN_TR1_TUPLE=1"],
+    }),
+    includes = [
+        "googletest",
+        "googletest/include",
+        "googletest/include/internal",
+        "googletest/test",
+    ],
+    linkopts = select({
+        "//:windows": [],
+        "//:windows_msvc": [],
+        "//conditions:default": [
+            "-pthread",
+        ],
+    }),
+    deps = ["//:gtest_main"],
+)
+
+
+# Tests death tests.
+cc_test(
+    name = "googletest-death-test-test",
+    size = "medium",
+    srcs = ["googletest-death-test-test.cc"],
+    deps = ["//:gtest_main"],
+)
+
+cc_test(
+    name = "gtest_test_macro_stack_footprint_test",
+    size = "small",
+    srcs = ["gtest_test_macro_stack_footprint_test.cc"],
+    deps = ["//:gtest"],
+)
+
+#These googletest tests have their own main()
+cc_test(
+    name = "googletest-listener-test",
+    size = "small",
+    srcs = ["googletest-listener-test.cc"],
+    deps = ["//:gtest_main"],
+)
+
+cc_test(
+    name = "gtest-unittest-api_test",
+    size = "small",
+    srcs = [
+        "gtest-unittest-api_test.cc",
+    ],
+    deps = [
+        "//:gtest",
+    ],
+)
+
+cc_test(
+    name = "googletest-param-test-test",
+    size = "small",
+    srcs = [
+        "googletest-param-test-test.cc",
+        "googletest-param-test-test.h",
+        "googletest-param-test2-test.cc",
+    ],
+    deps = ["//:gtest"],
+)
+
+cc_test(
+    name = "gtest_unittest",
+    size = "small",
+    srcs = ["gtest_unittest.cc"],
+    args = ["--heap_check=strict"],
+    shard_count = 2,
+    deps = ["//:gtest_main"],
+)
+
+#  Py tests
+
+py_library(
+    name = "gtest_test_utils",
+    testonly = 1,
+    srcs = ["gtest_test_utils.py"],
+)
+
+cc_binary(
+    name = "gtest_help_test_",
+    testonly = 1,
+    srcs = ["gtest_help_test_.cc"],
+    deps = ["//:gtest_main"],
+)
+
+py_test(
+    name = "gtest_help_test",
+    size = "small",
+    srcs = ["gtest_help_test.py"],
+    data = [":gtest_help_test_"],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-output-test_",
+    testonly = 1,
+    srcs = ["googletest-output-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+
+py_test(
+    name = "googletest-output-test",
+    size = "small",
+    srcs = ["googletest-output-test.py"],
+    args = select({
+        ":has_absl": [],
+        "//conditions:default": ["--no_stacktrace_support"],
+    }),
+    data = [
+        "googletest-output-test-golden-lin.txt",
+        ":googletest-output-test_",
+    ],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-color-test_",
+    testonly = 1,
+    srcs = ["googletest-color-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-color-test",
+    size = "small",
+    srcs = ["googletest-color-test.py"],
+    data = [":googletest-color-test_"],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-env-var-test_",
+    testonly = 1,
+    srcs = ["googletest-env-var-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-env-var-test",
+    size = "medium",
+    srcs = ["googletest-env-var-test.py"],
+    data = [":googletest-env-var-test_"],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-filter-unittest_",
+    testonly = 1,
+    srcs = ["googletest-filter-unittest_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-filter-unittest",
+    size = "medium",
+    srcs = ["googletest-filter-unittest.py"],
+    data = [":googletest-filter-unittest_"],
+    deps = [":gtest_test_utils"],
+)
+
+
+cc_binary(
+    name = "googletest-break-on-failure-unittest_",
+    testonly = 1,
+    srcs = ["googletest-break-on-failure-unittest_.cc"],
+    deps = ["//:gtest"],
+)
+
+
+
+py_test(
+    name = "googletest-break-on-failure-unittest",
+    size = "small",
+    srcs = ["googletest-break-on-failure-unittest.py"],
+    data = [":googletest-break-on-failure-unittest_"],
+    deps = [":gtest_test_utils"],
+)
+
+
+cc_test(
+    name = "gtest_assert_by_exception_test",
+    size = "small",
+    srcs = ["gtest_assert_by_exception_test.cc"],
+    deps = ["//:gtest"],
+)
+
+
+
+cc_binary(
+    name = "googletest-throw-on-failure-test_",
+    testonly = 1,
+    srcs = ["googletest-throw-on-failure-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-throw-on-failure-test",
+    size = "small",
+    srcs = ["googletest-throw-on-failure-test.py"],
+    data = [":googletest-throw-on-failure-test_"],
+    deps = [":gtest_test_utils"],
+)
+
+
+cc_binary(
+    name = "googletest-list-tests-unittest_",
+    testonly = 1,
+    srcs = ["googletest-list-tests-unittest_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-list-tests-unittest",
+    size = "small",
+    srcs = ["googletest-list-tests-unittest.py"],
+    data = [":googletest-list-tests-unittest_"],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-shuffle-test_",
+    srcs = ["googletest-shuffle-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-shuffle-test",
+    size = "small",
+    srcs = ["googletest-shuffle-test.py"],
+    data = [":googletest-shuffle-test_"],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-catch-exceptions-no-ex-test_",
+    testonly = 1,
+    srcs = ["googletest-catch-exceptions-test_.cc"],
+    deps = ["//:gtest_main"],
+)
+
+cc_binary(
+    name = "googletest-catch-exceptions-ex-test_",
+    testonly = 1,
+    srcs = ["googletest-catch-exceptions-test_.cc"],
+    copts = ["-fexceptions"],
+    deps = ["//:gtest_main"],
+)
+
+py_test(
+    name = "googletest-catch-exceptions-test",
+    size = "small",
+    srcs = ["googletest-catch-exceptions-test.py"],
+    data = [
+        ":googletest-catch-exceptions-ex-test_",
+        ":googletest-catch-exceptions-no-ex-test_",
+    ],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "gtest_xml_output_unittest_",
+    testonly = 1,
+    srcs = ["gtest_xml_output_unittest_.cc"],
+    deps = ["//:gtest"],
+)
+
+cc_test(
+    name = "gtest_no_test_unittest",
+    size = "small",
+    srcs = ["gtest_no_test_unittest.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "gtest_xml_output_unittest",
+    size = "small",
+    srcs = [
+        "gtest_xml_output_unittest.py",
+        "gtest_xml_test_utils.py",
+    ],
+    args = select({
+        ":has_absl": [],
+        "//conditions:default": ["--no_stacktrace_support"],
+    }),
+    data = [
+        # We invoke gtest_no_test_unittest to verify the XML output
+        # when the test program contains no test definition.
+        ":gtest_no_test_unittest",
+        ":gtest_xml_output_unittest_",
+    ],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "gtest_xml_outfile1_test_",
+    testonly = 1,
+    srcs = ["gtest_xml_outfile1_test_.cc"],
+    deps = ["//:gtest_main"],
+)
+
+cc_binary(
+    name = "gtest_xml_outfile2_test_",
+    testonly = 1,
+    srcs = ["gtest_xml_outfile2_test_.cc"],
+    deps = ["//:gtest_main"],
+)
+
+py_test(
+    name = "gtest_xml_outfiles_test",
+    size = "small",
+    srcs = [
+        "gtest_xml_outfiles_test.py",
+        "gtest_xml_test_utils.py",
+    ],
+    data = [
+        ":gtest_xml_outfile1_test_",
+        ":gtest_xml_outfile2_test_",
+    ],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "googletest-uninitialized-test_",
+    testonly = 1,
+    srcs = ["googletest-uninitialized-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-uninitialized-test",
+    size = "medium",
+    srcs = ["googletest-uninitialized-test.py"],
+    data = ["googletest-uninitialized-test_"],
+    deps = [":gtest_test_utils"],
+)
+
+cc_binary(
+    name = "gtest_testbridge_test_",
+    testonly = 1,
+    srcs = ["gtest_testbridge_test_.cc"],
+    deps = ["//:gtest_main"],
+)
+
+# Tests that filtering via testbridge works
+py_test(
+    name = "gtest_testbridge_test",
+    size = "small",
+    srcs = ["gtest_testbridge_test.py"],
+    data = [":gtest_testbridge_test_"],
+    deps = [":gtest_test_utils"],
+)
+
+
+py_test(
+    name = "googletest-json-outfiles-test",
+    size = "small",
+    srcs = [
+        "googletest-json-outfiles-test.py",
+        "gtest_json_test_utils.py",
+    ],
+    data = [
+        ":gtest_xml_outfile1_test_",
+        ":gtest_xml_outfile2_test_",
+    ],
+    deps = [":gtest_test_utils"],
+)
+
+py_test(
+    name = "googletest-json-output-unittest",
+    size = "medium",
+    srcs = [
+        "googletest-json-output-unittest.py",
+        "gtest_json_test_utils.py",
+    ],
+    data = [
+        # We invoke gtest_no_test_unittest to verify the JSON output
+        # when the test program contains no test definition.
+        ":gtest_no_test_unittest",
+        ":gtest_xml_output_unittest_",
+    ],
+    args = select({
+        ":has_absl": [],
+        "//conditions:default": ["--no_stacktrace_support"],
+    }),
+    deps = [":gtest_test_utils"],
+)
+# Verifies interaction of death tests and exceptions.
+cc_test(
+    name = "googletest-death-test_ex_catch_test",
+    size = "medium",
+    srcs = ["googletest-death-test_ex_test.cc"],
+    copts = ["-fexceptions"],
+    defines = ["GTEST_ENABLE_CATCH_EXCEPTIONS_=1"],
+    deps = ["//:gtest"],
+)
+
+cc_binary(
+    name = "googletest-param-test-invalid-name1-test_",
+    testonly = 1,
+    srcs = ["googletest-param-test-invalid-name1-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+cc_binary(
+    name = "googletest-param-test-invalid-name2-test_",
+    testonly = 1,
+    srcs = ["googletest-param-test-invalid-name2-test_.cc"],
+    deps = ["//:gtest"],
+)
+
+py_test(
+    name = "googletest-param-test-invalid-name1-test",
+    size = "small",
+    srcs = ["googletest-param-test-invalid-name1-test.py"],
+    data = [":googletest-param-test-invalid-name1-test_"],
+    deps = [":gtest_test_utils"],
+)
+
+py_test(
+    name = "googletest-param-test-invalid-name2-test",
+    size = "small",
+    srcs = ["googletest-param-test-invalid-name2-test.py"],
+    data = [":googletest-param-test-invalid-name2-test_"],
+    deps = [":gtest_test_utils"],
+)

From e7327c13f6f20dff89a3f9e434eddce838564189 Mon Sep 17 00:00:00 2001
From: Aaron Dierking <aarond@fb.com>
Date: Thu, 11 Oct 2018 12:35:22 -0400
Subject: [PATCH 5/8] Merge 41fc9745d4a448db7d932250d22fac1dda287443 into
 658c6390a5b363f46c6ad448ad1bce9d6e97e53a

Accepts #1889

PiperOrigin-RevId: 216709878
---
 googletest/src/gtest-port.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc
index 91f285c6..aa98ddb1 100644
--- a/googletest/src/gtest-port.cc
+++ b/googletest/src/gtest-port.cc
@@ -41,6 +41,9 @@
 # include <io.h>
 # include <sys/stat.h>
 # include <map>  // Used in ThreadLocal.
+# ifdef _MSC_VER
+#  include <crtdbg.h>
+# endif  // _MSC_VER
 #else
 # include <unistd.h>
 #endif  // GTEST_OS_WINDOWS

From ad997b16b5f9193809e168153e75645370812266 Mon Sep 17 00:00:00 2001
From: David Neto <dneto@google.com>
Date: Thu, 11 Oct 2018 12:52:08 -0400
Subject: [PATCH 6/8] Merge 4c92120d6dedb4eeb499a8702faea0224e0a8b23 into
 658c6390a5b363f46c6ad448ad1bce9d6e97e53a

Closes #1893

PiperOrigin-RevId: 216712426
---
 googletest/cmake/internal_utils.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 91174061..98674367 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -352,7 +352,7 @@ function(install_project)
         get_target_property(t_pdb_name_debug ${t} COMPILE_PDB_NAME_DEBUG)
         get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY)
         install(FILES
-          "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<IF:$<CONFIG:Debug>,${t_pdb_name_debug},${t_pdb_name}>.pdb"
+          "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$<CONFIG:Debug>:${t_pdb_name_debug}>$<$<NOT:$<CONFIG:Debug>>:${t_pdb_name}>.pdb"
           DESTINATION ${CMAKE_INSTALL_LIBDIR}
           OPTIONAL)
       endforeach()

From b3b19a796cbb3222fb3a49daf3f0a9378e8505ad Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <komh@chollian.net>
Date: Thu, 11 Oct 2018 13:29:33 -0400
Subject: [PATCH 7/8] Merge c41b2bf861ef2ac1a975af05ff66d9256f280b01 into
 f203b2db77161fe54846ea9e839ebec81aeeccac

Closes #1899

PiperOrigin-RevId: 216719020
---
 googletest/include/gtest/internal/gtest-port-arch.h | 2 ++
 googletest/include/gtest/internal/gtest-port.h      | 4 +++-
 googletest/src/gtest-printers.cc                    | 2 +-
 googletest/src/gtest.cc                             | 2 +-
 googletest/test/googletest-filepath-test.cc         | 2 +-
 googletest/test/googletest-options-test.cc          | 6 ++++++
 googletest/test/gtest_test_utils.py                 | 3 ++-
 7 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/googletest/include/gtest/internal/gtest-port-arch.h b/googletest/include/gtest/internal/gtest-port-arch.h
index 587ed5e5..4f2b87ba 100644
--- a/googletest/include/gtest/internal/gtest-port-arch.h
+++ b/googletest/include/gtest/internal/gtest-port-arch.h
@@ -66,6 +66,8 @@
 # else
 #  define GTEST_OS_WINDOWS_DESKTOP 1
 # endif  // _WIN32_WCE
+#elif defined __OS2__
+# define GTEST_OS_OS2 1
 #elif defined __APPLE__
 # define GTEST_OS_MAC 1
 # if TARGET_OS_IPHONE
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index b0008b02..64bf67f0 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -129,6 +129,7 @@
 //   GTEST_OS_NACL     - Google Native Client (NaCl)
 //   GTEST_OS_NETBSD   - NetBSD
 //   GTEST_OS_OPENBSD  - OpenBSD
+//   GTEST_OS_OS2      - OS/2
 //   GTEST_OS_QNX      - QNX
 //   GTEST_OS_SOLARIS  - Sun Solaris
 //   GTEST_OS_SYMBIAN  - Symbian
@@ -681,7 +682,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
 
 // Determines whether the system compiler uses UTF-16 for encoding wide strings.
 #define GTEST_WIDE_STRING_USES_UTF16_ \
-    (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
+    (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || \
+     GTEST_OS_AIX || GTEST_OS_OS2)
 
 // Determines whether test results can be streamed to a socket.
 #if GTEST_OS_LINUX
diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index 3c0e7582..12e6dbb6 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -348,7 +348,7 @@ void PrintTo(const wchar_t* s, ostream* os) {
     *os << "NULL";
   } else {
     *os << ImplicitCast_<const void*>(s) << " pointing to ";
-    PrintCharsAsStringTo(s, std::wcslen(s), os);
+    PrintCharsAsStringTo(s, wcslen(s), os);
   }
 }
 #endif  // wchar_t is native
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index b0c9c979..8ae25722 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -445,7 +445,7 @@ static ::std::vector<std::string> g_argvs;
 FilePath GetCurrentExecutableName() {
   FilePath result;
 
-#if GTEST_OS_WINDOWS
+#if GTEST_OS_WINDOWS || GTEST_OS_OS2
   result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe"));
 #else
   result.Set(FilePath(GetArgvs()[0]));
diff --git a/googletest/test/googletest-filepath-test.cc b/googletest/test/googletest-filepath-test.cc
index 37f02fb4..72d1c440 100644
--- a/googletest/test/googletest-filepath-test.cc
+++ b/googletest/test/googletest-filepath-test.cc
@@ -80,7 +80,7 @@ TEST(GetCurrentDirTest, ReturnsCurrentDir) {
   const FilePath cwd = FilePath::GetCurrentDir();
   posix::ChDir(original_dir.c_str());
 
-# if GTEST_OS_WINDOWS
+# if GTEST_OS_WINDOWS || GTEST_OS_OS2
 
   // Skips the ":".
   const char* const cwd_without_drive = strchr(cwd.c_str(), ':');
diff --git a/googletest/test/googletest-options-test.cc b/googletest/test/googletest-options-test.cc
index edd4eba3..7a27a72b 100644
--- a/googletest/test/googletest-options-test.cc
+++ b/googletest/test/googletest-options-test.cc
@@ -102,6 +102,12 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
       _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
       _strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
       _strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
+#elif GTEST_OS_OS2
+  const bool success =
+      strcasecmp("googletest-options-test", exe_str.c_str()) == 0 ||
+      strcasecmp("gtest-options-ex_test", exe_str.c_str()) == 0 ||
+      strcasecmp("gtest_all_test", exe_str.c_str()) == 0 ||
+      strcasecmp("gtest_dll_test", exe_str.c_str()) == 0;
 #elif GTEST_OS_FUCHSIA
   const bool success = exe_str == "app";
 #else
diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py
index 43cba8f4..245dcb10 100755
--- a/googletest/test/gtest_test_utils.py
+++ b/googletest/test/gtest_test_utils.py
@@ -36,6 +36,7 @@ import sys
 
 IS_WINDOWS = os.name == 'nt'
 IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0]
+IS_OS2 = os.name == 'os2'
 
 import atexit
 import shutil
@@ -164,7 +165,7 @@ def GetTestExecutablePath(executable_name, build_dir=None):
 
   path = os.path.abspath(os.path.join(build_dir or GetBuildDir(),
                                       executable_name))
-  if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'):
+  if (IS_WINDOWS or IS_CYGWIN or IS_OS2) and not path.endswith('.exe'):
     path += '.exe'
 
   if not os.path.exists(path):

From 864b6c2d35db5c2c8ca4a4bad66e295a64f47011 Mon Sep 17 00:00:00 2001
From: misterg <misterg@google.com>
Date: Thu, 11 Oct 2018 14:40:25 -0400
Subject: [PATCH 8/8] Remove duplicate functionality PrintValue (in
 googletest-param-test-test.cc), use testing::PrintToString

PiperOrigin-RevId: 216733373
---
 googletest/test/googletest-param-test-test.cc | 38 +------------------
 1 file changed, 1 insertion(+), 37 deletions(-)

diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc
index 05e0b239..c78623a4 100644
--- a/googletest/test/googletest-param-test-test.cc
+++ b/googletest/test/googletest-param-test-test.cc
@@ -67,43 +67,7 @@ using ::testing::internal::UnitTestOptions;
 // EXPECT_THAT() and the matchers know how to print tuples.
 template <typename T>
 ::std::string PrintValue(const T& value) {
-  ::std::stringstream stream;
-  stream << value;
-  return stream.str();
-}
-
-// These overloads allow printing tuples in our tests.  We cannot
-// define an operator<< for tuples, as that definition needs to be in
-// the std namespace in order to be picked up by Google Test via
-// Argument-Dependent Lookup, yet defining anything in the std
-// namespace in non-STL code is undefined behavior.
-
-template <typename T1, typename T2>
-::std::string PrintValue(const std::tuple<T1, T2>& value) {
-  ::std::stringstream stream;
-  stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ")";
-  return stream.str();
-}
-
-template <typename T1, typename T2, typename T3>
-::std::string PrintValue(const std::tuple<T1, T2, T3>& value) {
-  ::std::stringstream stream;
-  stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", "
-         << std::get<2>(value) << ")";
-  return stream.str();
-}
-
-template <typename T1, typename T2, typename T3, typename T4, typename T5,
-          typename T6, typename T7, typename T8, typename T9, typename T10>
-::std::string PrintValue(
-    const std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& value) {
-  ::std::stringstream stream;
-  stream << "(" << std::get<0>(value) << ", " << std::get<1>(value) << ", "
-         << std::get<2>(value) << ", " << std::get<3>(value) << ", "
-         << std::get<4>(value) << ", " << std::get<5>(value) << ", "
-         << std::get<6>(value) << ", " << std::get<7>(value) << ", "
-         << std::get<8>(value) << ", " << std::get<9>(value) << ")";
-  return stream.str();
+  return testing::PrintToString(value);
 }
 
 // Verifies that a sequence generated by the generator and accessed