all.sh: improve fragile not grep idiom #266
Labels
No labels
approved
bug
dependencies
DO-NOT-MERGE
enhancement
good-first-issue
help-wanted
historical-reviewed
historical-reviewing
needs-adoption
needs-ci
needs-design-approval
needs-info
needs-preceding-pr
needs-review
needs-reviewer
needs-work
priority-high
priority-low
priority-medium
priority-scheduled
priority-very-high
single-reviewer
size-l
size-m
size-s
size-xs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Mbed-TLS/mbedtls-framework#266
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We often check for the absence of a function in a file with the idiom
not grep REGEXP FILE[...]inall.sh. The functionnotis a wrapper around!that takes care of failing the component if the command exits with the status 0. As noted in https://github.com/Mbed-TLS/mbedtls/pull/10517#discussion_r2675303189 this is fragile: it'll pass if the file doesn't exist.The goal of this issue is:
not_grepis natural but might be a bit misleading since it's not just! grep.not_grep REGEXP FILE[...]passes if all the files exist and the regexp is not found in any of the files. Note that the files can be expressed as a pattern, and since we use bash with default settings, if the pattern doesn't match any file, it'll remain unexpanded and the function will see it as a file name that doesn't exist.not grepby the new function intests/scripts/components-*.shin all branches.