-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into hardening/orion-mongodb-7.0
- Loading branch information
Showing
27 changed files
with
284 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
This patch adapt the original fuse_gest_files.py to Python 3 | ||
Check build_source.md file to see how it is used | ||
|
||
--- fuse_gtest_files.py.orig 2023-09-01 11:26:02.036070350 +0200 | ||
+++ fuse_gtest_files.py 2023-09-01 11:39:16.422565989 +0200 | ||
@@ -1,4 +1,4 @@ | ||
-#!/usr/bin/env python | ||
+#!/usr/bin/env python3 | ||
# | ||
# Copyright 2009, Google Inc. | ||
# All rights reserved. | ||
@@ -60,7 +60,6 @@ | ||
|
||
import os | ||
import re | ||
-import sets | ||
import sys | ||
|
||
# We assume that this file is in the scripts/ directory in the Google | ||
@@ -90,8 +89,8 @@ | ||
""" | ||
|
||
if not os.path.isfile(os.path.join(directory, relative_path)): | ||
- print 'ERROR: Cannot find %s in directory %s.' % (relative_path, | ||
- directory) | ||
+ print ('ERROR: Cannot find %s in directory %s.' % (relative_path, | ||
+ directory)) | ||
print ('Please either specify a valid project root directory ' | ||
'or omit it on the command line.') | ||
sys.exit(1) | ||
@@ -123,7 +122,7 @@ | ||
(relative_path, output_dir)) | ||
answer = sys.stdin.readline().strip() | ||
if answer not in ['y', 'Y']: | ||
- print 'ABORTED.' | ||
+ print ('ABORTED.') | ||
sys.exit(1) | ||
|
||
# Makes sure the directory holding the output file exists; creates | ||
@@ -146,8 +145,8 @@ | ||
def FuseGTestH(gtest_root, output_dir): | ||
"""Scans folder gtest_root to generate gtest/gtest.h in output_dir.""" | ||
|
||
- output_file = file(os.path.join(output_dir, GTEST_H_OUTPUT), 'w') | ||
- processed_files = sets.Set() # Holds all gtest headers we've processed. | ||
+ output_file = open(os.path.join(output_dir, GTEST_H_OUTPUT), 'w') | ||
+ processed_files = set() # Holds all gtest headers we've processed. | ||
|
||
def ProcessFile(gtest_header_path): | ||
"""Processes the given gtest header file.""" | ||
@@ -159,7 +158,7 @@ | ||
processed_files.add(gtest_header_path) | ||
|
||
# Reads each line in the given gtest header. | ||
- for line in file(os.path.join(gtest_root, gtest_header_path), 'r'): | ||
+ for line in open(os.path.join(gtest_root, gtest_header_path), 'r'): | ||
m = INCLUDE_GTEST_FILE_REGEX.match(line) | ||
if m: | ||
# It's '#include <gtest/...>' - let's process it recursively. | ||
@@ -175,7 +174,7 @@ | ||
def FuseGTestAllCcToFile(gtest_root, output_file): | ||
"""Scans folder gtest_root to generate gtest/gtest-all.cc in output_file.""" | ||
|
||
- processed_files = sets.Set() | ||
+ processed_files = set() | ||
|
||
def ProcessFile(gtest_source_file): | ||
"""Processes the given gtest source file.""" | ||
@@ -187,7 +186,7 @@ | ||
processed_files.add(gtest_source_file) | ||
|
||
# Reads each line in the given gtest source file. | ||
- for line in file(os.path.join(gtest_root, gtest_source_file), 'r'): | ||
+ 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: | ||
@@ -218,7 +217,7 @@ | ||
def FuseGTestAllCc(gtest_root, output_dir): | ||
"""Scans folder gtest_root to generate gtest/gtest-all.cc in output_dir.""" | ||
|
||
- output_file = file(os.path.join(output_dir, GTEST_ALL_CC_OUTPUT), 'w') | ||
+ output_file = open(os.path.join(output_dir, GTEST_ALL_CC_OUTPUT), 'w') | ||
FuseGTestAllCcToFile(gtest_root, output_file) | ||
output_file.close() | ||
|
||
@@ -242,7 +241,7 @@ | ||
# fuse_gtest_files.py GTEST_ROOT_DIR OUTPUT_DIR | ||
FuseGTest(sys.argv[1], sys.argv[2]) | ||
else: | ||
- print __doc__ | ||
+ print (__doc__) | ||
sys.exit(1) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.