From 0184cece093ae9e683abaa72dc946aecae9fa310 Mon Sep 17 00:00:00 2001 From: Esteban82 Date: Sat, 22 Aug 2026 11:11:46 -0300 Subject: [PATCH] test: gmtest no longer requires execute permission on test scripts Test scripts are sourced (". ${local_script}"), not executed, so the existing "if ! [ -x "${script}" ]" guard was checking the wrong bit. It started failing every test once #9133 removed the unnecessary executable permission from *.sh scripts. Relax the guard to check readability instead. Note: switching the sourcing itself (". ${local_script}") to "bash ${local_script}" was also proposed, but that would run the test script in a subshell instead of gmtest.sh's own shell, breaking the "ps=" variable classic-mode scripts set for later baseline comparison (it wouldn't propagate back). Sourcing is kept as-is since it never required execute permission in the first place. Related to #9048, GenericMappingTools/gmt#9133 Assisted-by: Claude Sonnet 5 (High effort) --- test/gmtest.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gmtest.in b/test/gmtest.in index c1644e2142d..0d9742ebd44 100755 --- a/test/gmtest.in +++ b/test/gmtest.in @@ -53,8 +53,8 @@ fi # Any script override of GRAPHICSMAGICK_RMS? Must be a comment line of the format # GRAPHICSMAGICK_RMS = GRAPHICSMAGICK_RMS=$(grep "GRAPHICSMAGICK_RMS" "$script" | awk '{print $4}') -if ! [ -x "${script}" ]; then - echo "error: cannot execute script ${script}." >&2 +if ! [ -r "${script}" ]; then + echo "error: cannot read script ${script}." >&2 exit 1 fi