[libcxx-commits] [libcxx] c92cdb4 - [libc++] [test] Recommit the unsetting of LC_COLLATE in the builder script.
Arthur O'Dwyer via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 30 11:49:27 PDT 2021
Author: Arthur O'Dwyer
Date: 2021-04-30T14:49:10-04:00
New Revision: c92cdb48788115e093e29143d0bdf9fca32d1f61
URL: https://github.com/llvm/llvm-project/commit/c92cdb48788115e093e29143d0bdf9fca32d1f61
DIFF: https://github.com/llvm/llvm-project/commit/c92cdb48788115e093e29143d0bdf9fca32d1f61.diff
LOG: [libc++] [test] Recommit the unsetting of LC_COLLATE in the builder script.
This re-reverts one piece of 1b885573327d0f6b36f24ad23d243642f658750b,
reapplying one piece of D101437 (but not the "service"-queue piece of it).
It turns out that the behavior of `grep [^ -~]`, or even `grep [A-Z]`,
depends on locale, specifically `LC_COLLATE`. So we want to make sure
we're not in any weird locale, no matter what machine we're running on.
Yes, "en_US.UTF-8" counts as weird!
https://stackoverflow.com/questions/67320156/misbehavior-of-gnu-grep-when-grepping-for-ignores-spaces
https://stackoverflow.com/questions/6799872/how-to-make-grep-a-z-independent-of-locale
Added:
Modified:
libcxx/utils/ci/run-buildbot
Removed:
################################################################################
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 1042b110f2bf7..17cb85b886acb 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -9,6 +9,9 @@
set -ex
set -o pipefail
+unset LANG
+unset LC_ALL
+unset LC_COLLATE
PROGNAME="$(basename "${0}")"
@@ -146,6 +149,7 @@ check-generated-output)
# Check if the
diff s are empty, fail otherwise.
! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false
# Reject patches that introduce non-ASCII characters or hard tabs.
+ # Depends on LC_COLLATE set at the top of this script.
! grep -rn '[^ -~]' libcxx/include/ || false
# Check that no dependency cycles have been introduced.
python3 libcxx/utils/graph_header_deps.py >/dev/null
More information about the libcxx-commits
mailing list