summaryrefslogtreecommitdiffstats
path: root/googletest/scripts/fuse_gtest_files.py
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2019-08-19 18:20:02 (GMT)
committerGennadiy Civil <misterg@google.com>2019-08-19 18:20:03 (GMT)
commit30e58a89a42b8bf98619ac16da2c515d042ca8ff (patch)
tree42f965a68eeb1345630c991c6882b3539aeda5d2 /googletest/scripts/fuse_gtest_files.py
parentfcffabb5beb84bbc2a6050f7cf8dda16844d22d3 (diff)
parent800c9b30168f2167776d729759bf90122c987e35 (diff)
downloadgoogletest-30e58a89a42b8bf98619ac16da2c515d042ca8ff.zip
googletest-30e58a89a42b8bf98619ac16da2c515d042ca8ff.tar.gz
googletest-30e58a89a42b8bf98619ac16da2c515d042ca8ff.tar.bz2
Merge pull request #2381 from Yannic:fix_bazel
PiperOrigin-RevId: 264186624
Diffstat (limited to 'googletest/scripts/fuse_gtest_files.py')
-rwxr-xr-xgoogletest/scripts/fuse_gtest_files.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/googletest/scripts/fuse_gtest_files.py b/googletest/scripts/fuse_gtest_files.py
index d0dd464..fb0c322 100755
--- a/googletest/scripts/fuse_gtest_files.py
+++ b/googletest/scripts/fuse_gtest_files.py
@@ -172,6 +172,7 @@ def FuseGTestH(gtest_root, output_dir):
output_file.write(line)
ProcessFile(GTEST_H_SEED)
+ ProcessFile(GTEST_SPI_H_SEED)
output_file.close()
@@ -193,20 +194,15 @@ def FuseGTestAllCcToFile(gtest_root, output_file):
for line in open(os.path.join(gtest_root, gtest_source_file), 'r'):
m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m:
- if 'include/' + m.group(1) == GTEST_SPI_H_SEED:
- # It's '#include "gtest/gtest-spi.h"'. This file is not
- # #included by "gtest/gtest.h", so we need to process it.
- ProcessFile(GTEST_SPI_H_SEED)
- else:
- # It's '#include "gtest/foo.h"' where foo is not gtest-spi.
- # We treat it as '#include "gtest/gtest.h"', as all other
- # gtest headers are being fused into gtest.h and cannot be
- # #included directly.
-
- # There is no need to #include "gtest/gtest.h" more than once.
- if not GTEST_H_SEED in processed_files:
- processed_files.add(GTEST_H_SEED)
- output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
+ # It's '#include "gtest/foo.h"'.
+ # We treat it as '#include "gtest/gtest.h"', as all other
+ # gtest headers are being fused into gtest.h and cannot be
+ # #included directly.
+
+ # There is no need to #include "gtest/gtest.h" more than once.
+ if not GTEST_H_SEED in processed_files:
+ processed_files.add(GTEST_H_SEED)
+ output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
else:
m = INCLUDE_SRC_FILE_REGEX.match(line)
if m: