From b60b083fd9e79289a167d8a5a558c927a0938944 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Dec 2024 08:11:59 +0100 Subject: [PATCH] test-framework-sh: Avoid test suite failures on MSYS2. * tests/init.sh (mkdir) [MSys]: New function. --- ChangeLog | 5 +++++ tests/init.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index e01d475534..3406bd39f7 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_ () { -- 2.39.5