From 3f597e59e00ba2c2392ee47791c4ec1def114f2f Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Tue, 28 Jan 2025 22:10:49 +0000 Subject: [PATCH] Adjust the installer test to retry with both "gmake" and "make", to work around strange behaviour on NetBSD. --- tests/Bug_-_Install_all_files.test | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/Bug_-_Install_all_files.test b/tests/Bug_-_Install_all_files.test index afe3d8a..953a841 100755 --- a/tests/Bug_-_Install_all_files.test +++ b/tests/Bug_-_Install_all_files.test @@ -29,8 +29,20 @@ if ! test -n "${testInstallDir}"; then fi export DESTDIR="${testInstallDir}" -if ! ${makeCommand} -C "${makeDir}" install DESTDIR="${testInstallDir}" >"${workFile1}" 2>&1; then - echo "\`make install' exited $?" +${makeCommand} -C "${makeDir}" install DESTDIR="${testInstallDir}" >"${workFile1}" 2>&1 +rc=$? +if ! test "${rc}" -eq 0; then + if ! test "${makeCommand}" = "make"; then + # Retry with plain "make". + makeCommand="make" + ${makeCommand} -C "${makeDir}" install DESTDIR="${testInstallDir}" >>"${workFile1}" 2>&1 + rc=$? + fi +fi +if ! test ${rc} -eq 0; then + echo "\`make install' exited ${rc}" + echo "command: ${makeCommand} -C '${makeDir}' install DESTDIR='${testInstallDir}'" + cat "${workFile1}" rm -rf "${testInstallDir}" exit 1 fi