Check in fused GTest files
The fuse_gtest_files.py script was removed from GTest in https://github.com/google/googletest/commit/47f819c3ca. Consequently we can no longer generate these files at runtime.
This commit is contained in:
parent
cf4457bbb3
commit
92f67ee847
|
@ -0,0 +1,28 @@
|
|||
Copyright 2008, 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.
|
|
@ -4,11 +4,14 @@ URL: https://github.com/google/googletest
|
|||
License: BSD (see LICENSE file)
|
||||
|
||||
Description:
|
||||
Fuzed (single header/source file) version of GoogleTest. Generated from the
|
||||
Chromium source checkout with the following command:
|
||||
Fuzed (single header/source file) version of GoogleTest. Generated from a
|
||||
Chromium version 93.0.4577.51 source checkout with the following command:
|
||||
|
||||
cd /path/to/chromium/src/third_party/googletest/src/googletest/scripts
|
||||
./fuse_gtest_files.py <out_directory>
|
||||
|
||||
This script was removed from GTest in
|
||||
https://github.com/google/googletest/commit/47f819c3ca.
|
||||
|
||||
Local Modifications:
|
||||
None.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -174,43 +174,35 @@ def create_readme():
|
|||
sys.stdout.write('Creating README.TXT file.\n')
|
||||
|
||||
|
||||
def create_fuzed_gtest(tests_dir):
|
||||
""" Generate a fuzed version of gtest and build the expected directory structure. """
|
||||
src_gtest_dir = os.path.join(src_dir, 'third_party', 'googletest', 'src',
|
||||
'googletest')
|
||||
run('%s fuse_gtest_files.py \"%s\"' % (sys.executable, tests_dir),
|
||||
os.path.join(src_gtest_dir, 'scripts'))
|
||||
|
||||
def copy_gtest(tests_dir):
|
||||
""" Copy GTest files to the expected directory structure. """
|
||||
if not options.quiet:
|
||||
sys.stdout.write('Building gtest directory structure.\n')
|
||||
|
||||
src_gtest_dir = os.path.join(cef_dir, 'tools', 'distrib', 'gtest')
|
||||
target_gtest_dir = os.path.join(tests_dir, 'gtest')
|
||||
gtest_header = os.path.join(target_gtest_dir, 'gtest.h')
|
||||
gtest_cpp = os.path.join(target_gtest_dir, 'gtest-all.cc')
|
||||
|
||||
if not os.path.exists(gtest_header):
|
||||
raise Exception('Generated file not found: %s' % gtest_header)
|
||||
if not os.path.exists(gtest_cpp):
|
||||
raise Exception('Generated file not found: %s' % gtest_cpp)
|
||||
|
||||
# gtest header file at tests/gtest/include/gtest/gtest.h
|
||||
target_gtest_header_dir = os.path.join(target_gtest_dir, 'include', 'gtest')
|
||||
make_dir(target_gtest_header_dir, options.quiet)
|
||||
move_file(gtest_header, target_gtest_header_dir, options.quiet)
|
||||
copy_file(
|
||||
os.path.join(src_gtest_dir, 'gtest.h'), target_gtest_header_dir,
|
||||
options.quiet)
|
||||
|
||||
# gtest source file at tests/gtest/src/gtest-all.cc
|
||||
target_gtest_cpp_dir = os.path.join(target_gtest_dir, 'src')
|
||||
make_dir(target_gtest_cpp_dir, options.quiet)
|
||||
move_file(gtest_cpp, target_gtest_cpp_dir, options.quiet)
|
||||
copy_file(
|
||||
os.path.join(src_gtest_dir, 'gtest-all.cc'), target_gtest_cpp_dir,
|
||||
options.quiet)
|
||||
|
||||
# gtest LICENSE file at tests/gtest/LICENSE
|
||||
copy_file(
|
||||
os.path.join(src_gtest_dir, os.pardir, 'LICENSE'), target_gtest_dir,
|
||||
options.quiet)
|
||||
os.path.join(src_gtest_dir, 'LICENSE'), target_gtest_dir, options.quiet)
|
||||
|
||||
# CEF README file at tests/gtest/README.cef
|
||||
copy_file(
|
||||
os.path.join(cef_dir, 'tests', 'gtest', 'README.cef.in'),
|
||||
os.path.join(src_gtest_dir, 'README.cef'),
|
||||
os.path.join(target_gtest_dir, 'README.cef'), options.quiet)
|
||||
|
||||
# Copy tests/gtest/teamcity files
|
||||
|
@ -824,8 +816,8 @@ if mode == 'standard':
|
|||
transfer_gypi_files(cef_dir, cef_paths2['ceftests_sources_common'], \
|
||||
'tests/ceftests/', ceftests_dir, options.quiet)
|
||||
|
||||
# create the fuzed gtest version
|
||||
create_fuzed_gtest(tests_dir)
|
||||
# copy GTest files
|
||||
copy_gtest(tests_dir)
|
||||
|
||||
# process cmake templates
|
||||
if not options.ozone:
|
||||
|
|
Loading…
Reference in New Issue