diff --git a/tests/before/test-executability.sh b/tests/before/test-executability.sh index 5b0c7956..1ef14b2f 100755 --- a/tests/before/test-executability.sh +++ b/tests/before/test-executability.sh @@ -25,8 +25,13 @@ set -o pipefail stdout=$2 +declare -a excludes=() +for e in dataset lib pylint_plugins venv; do + excludes+=(-not -path "${LOCAL}/${e}/**") +done + { - scripts=$(find "${LOCAL}" -not -path "${LOCAL}/dataset/**" -type f -name '*.sh') + scripts=$(find "${LOCAL}" "${excludes[@]}" -type f -name '*.sh') echo "${scripts}" | while IFS= read -r sh; do if [ ! -x "${sh}" ]; then echo "Script '${sh}' is not executable, try running 'chmod +x ${sh}'" @@ -38,7 +43,7 @@ stdout=$2 echo "👍🏻 All .sh scripts are executable" { - scripts=$(find "${LOCAL}" -not -path "${LOCAL}/dataset/**" -type f -name '*.py') + scripts=$(find "${LOCAL}" "${excludes[@]}" -type f -name '*.py') echo "${scripts}" | while IFS= read -r py; do if [ ! -x "${py}" ]; then echo "Script '${py}' is not executable, try running 'chmod +x ${py}'"