tests: enforce equivalent tests.

This commit is contained in:
Alexandre Pujol 2025-06-19 23:35:13 +02:00
parent 27907e5a17
commit 033a7475e0
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -134,6 +134,7 @@ _check_directory_mark() {
declare -A EQUIVALENTS=( declare -A EQUIVALENTS=(
["awk"]="{m,g,}awk" ["awk"]="{m,g,}awk"
["gawk"]="{m,g,}awk"
["grep"]="{,e}grep" ["grep"]="{,e}grep"
["which"]="which{,.debianutils}" ["which"]="which{,.debianutils}"
) )
@ -371,7 +372,10 @@ check_profiles() {
-prune -o -type f -print -prune -o -type f -print
) )
jobs=0 jobs=0
WITH_CHECK=(abi include profile header tabs trailing indentation subprofiles vim) WITH_CHECK=(
equivalent
abi include profile header tabs trailing indentation subprofiles vim
)
for file in "${files[@]}"; do for file in "${files[@]}"; do
( (
name="$(basename "$file")" name="$(basename "$file")"
@ -388,7 +392,10 @@ check_abstractions() {
_msg "Checking abstractions" _msg "Checking abstractions"
mapfile -t files < <(find "$APPARMORD/abstractions" -type f -not -path "$APPARMORD/abstractions/*.d/*") mapfile -t files < <(find "$APPARMORD/abstractions" -type f -not -path "$APPARMORD/abstractions/*.d/*")
jobs=0 jobs=0
WITH_CHECK=(abi include header tabs trailing indentation vim) WITH_CHECK=(
equivalent
abi include header tabs trailing indentation vim
)
for file in "${files[@]}"; do for file in "${files[@]}"; do
( (
name="$(basename "$file")" name="$(basename "$file")"
@ -406,7 +413,10 @@ check_abstractions() {
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
jobs=0 jobs=0
WITH_CHECK=(header tabs trailing indentation vim) WITH_CHECK=(
equivalent
header tabs trailing indentation vim
)
for file in "${files[@]}"; do for file in "${files[@]}"; do
_check "$file" & _check "$file" &
_wait jobs _wait jobs