From: Bruno Haible Date: Sun, 22 Dec 2024 07:11:59 +0000 (+0100) Subject: test-framework-sh: Avoid test suite failures on MSYS2. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b21a761831de9c0721081033930d36f2ec61b655;p=gnulib.git test-framework-sh: Avoid test suite failures on MSYS2. * tests/init.sh (mkdir) [MSys]: New function. --- diff --git a/ChangeLog b/ChangeLog index d801a2124d..5dabbd7f17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-12-22 Bruno Haible + + test-framework-sh: Avoid test suite failures on MSYS2. + * tests/init.sh (mkdir) [MSys]: New function. + 2024-12-22 Bruno Haible execl, execle, execlp: Fix compilation error with gcc 14. diff --git a/tests/init.sh b/tests/init.sh index 3bd1e3b9cd..80931d7c96 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -277,6 +277,19 @@ test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases # - try to create the desired directory. # - make only $MAX_TRIES_ attempts +# mkdir on msys2 does not support the '-m' option. +case `(uname -o) 2>/dev/null` in + Msys) + mkdir () + { + if test " $1" = " -m"; then + shift; shift + fi + /bin/mkdir "$@" + } + ;; +esac + # Helper function. Print $N pseudo-random bytes from a-zA-Z0-9. rand_bytes_ () {