代码拉取完成,页面将自动刷新
同步操作将从 望日蓮/protobuf 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/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 "${golden_dir}/${file}" "${test_dir}/${file}"
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。