-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate from Piper for C++, Java, and Python #10254
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
887daf6
Sync from Piper @461045587
haberman 36fb437
Merge tag 'refs/tags/sync-piper' into sync-stage
haberman eb8d84e
Updated CHANGES.txt.
haberman a0e3399
Sync from Piper @461060848
haberman bc3560e
Merge tag 'refs/tags/sync-piper' into sync-stage
haberman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
# This script verifies that BUILD files and cmake files are in sync with src/Makefile.am | ||
|
||
set -eo pipefail | ||
|
||
if [ "$(uname)" != "Linux" ]; then | ||
echo "build_files_updated_unittest only supported on Linux. Skipping..." | ||
exit 0 | ||
fi | ||
|
||
# Keep in sync with files needed by update_file_lists.sh | ||
generated_files=( | ||
"BUILD" | ||
"cmake/extract_includes.bat.in" | ||
"cmake/libprotobuf-lite.cmake" | ||
"cmake/libprotobuf.cmake" | ||
"cmake/libprotoc.cmake" | ||
"cmake/tests.cmake" | ||
"src/Makefile.am" | ||
) | ||
|
||
# If we're running in Bazel, use the Bazel-provided temp-dir. | ||
if [ -n "${TEST_TMPDIR}" ]; then | ||
# Env-var TEST_TMPDIR is set, assume that this is Bazel. | ||
# Bazel may have opinions whether we are allowed to delete TEST_TMPDIR. | ||
test_root="${TEST_TMPDIR}/build_files_updated_unittest" | ||
mkdir "${test_root}" | ||
else | ||
# Seems like we're not executed by Bazel. | ||
test_root=$(mktemp -d) | ||
fi | ||
|
||
# From now on, fail if there are any unbound variables. | ||
set -u | ||
|
||
# Remove artifacts after test is finished. | ||
function cleanup { | ||
rm -rf "${test_root}" | ||
} | ||
trap cleanup EXIT | ||
|
||
# Create golden dir and add snapshot of current state. | ||
golden_dir="${test_root}/golden" | ||
mkdir -p "${golden_dir}/cmake" "${golden_dir}/src" | ||
for file in ${generated_files[@]}; do | ||
cp "${file}" "${golden_dir}/${file}" | ||
done | ||
|
||
# Create test dir, copy current state into it, and execute update script. | ||
test_dir="${test_root}/test" | ||
cp -R "${golden_dir}" "${test_dir}" | ||
|
||
cp "update_file_lists.sh" "${test_dir}/update_file_lists.sh" | ||
chmod +x "${test_dir}/update_file_lists.sh" | ||
cd "${test_root}/test" | ||
bash "${test_dir}/update_file_lists.sh" | ||
|
||
# Test whether there are any differences | ||
for file in ${generated_files[@]}; do | ||
diff -du "${golden_dir}/${file}" "${test_dir}/${file}" | ||
done |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something went wrong with the merge here because in #10243, this file was recently deleted and cmake/update_file_lists.sh was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.