diff options
| author | Abseil Team <absl-team@google.com> | 2020-10-15 17:14:57 -0400 |
|---|---|---|
| committer | Derek Mauro <dmauro@google.com> | 2020-10-19 14:01:26 -0400 |
| commit | 252ee42d3bb96e6d248063f622ece41ea5dce999 (patch) | |
| tree | 0c9025e48a894a685a8c6d912b2e3ddce5f3c4f8 /googlemock | |
| parent | 3c95bf552405fd0cc63cea0ca2f6c4cd89c8d356 (diff) | |
| download | googletest-252ee42d3bb96e6d248063f622ece41ea5dce999.tar.gz googletest-252ee42d3bb96e6d248063f622ece41ea5dce999.zip | |
Googletest export
Fix some issues when running fuse_gmock_files.
The module path should be updated before importing `fuse_gtest_files`, since
the script may not run from the googletest repo root. We also need a non-frozen
set in order to track progress.
PiperOrigin-RevId: 337380466
Diffstat (limited to 'googlemock')
| -rwxr-xr-x | googlemock/scripts/fuse_gmock_files.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/googlemock/scripts/fuse_gmock_files.py b/googlemock/scripts/fuse_gmock_files.py index 0c5bb9f4..c3ba3b83 100755 --- a/googlemock/scripts/fuse_gmock_files.py +++ b/googlemock/scripts/fuse_gmock_files.py @@ -66,8 +66,6 @@ import os import re import sys -import fuse_gtest_files - __author__ = 'wan@google.com (Zhanyong Wan)' # We assume that this file is in the scripts/ directory in the Google @@ -76,7 +74,7 @@ DEFAULT_GMOCK_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') # We need to call into googletest/scripts/fuse_gtest_files.py. sys.path.append(os.path.join(DEFAULT_GMOCK_ROOT_DIR, '../googletest/scripts')) -gtest = fuse_gtest_files +import fuse_gtest_files as gtest # pylint:disable=g-import-not-at-top # Regex for matching # '#include "gmock/..."'. @@ -130,7 +128,7 @@ def FuseGMockH(gmock_root, output_dir): """Scans folder gmock_root to generate gmock/gmock.h in output_dir.""" output_file = open(os.path.join(output_dir, GMOCK_H_OUTPUT), 'w') - processed_files = frozenset() # Holds all gmock headers we've processed. + processed_files = set() # Holds all gmock headers we've processed. def ProcessFile(gmock_header_path): """Processes the given gmock header file.""" @@ -173,7 +171,7 @@ def FuseGMockH(gmock_root, output_dir): def FuseGMockAllCcToFile(gmock_root, output_file): """Scans folder gmock_root to fuse gmock-all.cc into output_file.""" - processed_files = frozenset() + processed_files = set() def ProcessFile(gmock_source_file): """Processes the given gmock source file.""" |

