Skip to content

Commit dbd13ff

Browse files
authored
Fix #1118: avoid using "-P" with grep (#1121)
The default version of `grep` on macOS (at least through macOS 15) does not take a `-P` argument, which causes `check/pytest` to fail due to the call to `grep -P` on line 432: ```shell grep -Pv '^(.\[0m)?[\.FEsx]+(.\[36m)?\s+\[\s*\d+%\](.\[0m)?$' ``` The problem is that `-P` is for using Perl-compatible regular expressions (PCRE), which are not standard in the BSD version of grep that comes with macOS. Switching to grep's extended regex syntax using `-E` resolves the problem.
1 parent 3869507 commit dbd13ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

check/pytest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if [ -z "${ACTUALLY_QUIET}" ]; then
4747
else
4848
# Filter out lines like "...F....x... [ 42%]", with coloring.
4949
pytest -c dev_tools/conf/pytest.ini \
50-
--rootdir="$rootdir" -q --color=yes "${PYTEST_ARGS[@]}" |
51-
grep -Pv '^(.\[0m)?[\.FEsx]+(.\[36m)?\s+\[\s*\d+%\](.\[0m)?$'
50+
--rootdir="$rootdir" -q --color=yes "${PYTEST_ARGS[@]}" | \
51+
grep -Ev '^(\x1B\[0m)?[\.FEsx]+(\x1B\[36m)?[[:space:]]+\[[[:space:]]*[0-9]+%\](\x1B\[0m)?$'
5252
exit "${PIPESTATUS[0]}"
5353
fi

0 commit comments

Comments
 (0)