Repository navigation
Make cronic portable to macOS's BSD grep and cmp, and test it on macOS - #141
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to The macOS test job follows the repository’s workflow requirements. No actionable merge-blocking issue remains from this review. Pre-merge checks |
|
# Conflicts: # cronic
… behavior, and detect BASH_XTRACEFD by feature Accept GNU make 3.81's `dir' quoting and the name gmake in cronic's make filter; state precisely which utilities cronic uses portably. In the tests, check cronic's behavior under a bash earlier than 4.1 instead of skipping it, run a real bash trace nested 3 deep through the stderr path, and test /bin/bash for BASH_XTRACEFD support rather than copying cronic's version test.
…more thoroughly Simplify cronic's trace pattern and stderr filter. Run the trace-and-stderr check on every bash, run the PS4-dependent old-bash checks only when not root, make temp-file-test search through macOS's /tmp symlink, and put /bin first in PATH in the macOS CI job so that it tests bash 3.2.
…s, and make the BASH_XTRACEFD probe ignore warnings
…he trace file in one pass
…not repeat unfiltered stderr
…nto cronic-portability # Conflicts: # cronic # tests/cronic-test/cronic-test.sh
This pull request builds on #139; merge #139 first. Until then, this pull request's diff also shows #139's commits.
\+,\?, and\|with POSIX equivalents (a repeated group for the PS4 pattern, andgrep -Efor themakedirectory filter), and usecmp -srather thancmp --silent.cronic-test.sh, skip the two "silent" checks for a PS4 that contains an expansion or an escape when/bin/bashis earlier than 4.1. WithoutBASH_XTRACEFD, such trace lines go to stderr and cannot be recognized; these two checks already failed under bash 3.2.cronictests onmacos-latest, whose/bin/bashis bash 3.2 and whose utilities are BSD.Tested locally on Linux, and in the
bash:3.2Docker image (busyboxgrepandcmp) as a non-root user.