12cff5a
From 6d6fc91c472fd84bd71a1b012fa9ab77bd94efea Mon Sep 17 00:00:00 2001
12cff5a
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= <fberat@redhat.com>
12cff5a
Date: Mon, 12 Dec 2022 07:32:13 +0100
12cff5a
Subject: [PATCH] tests: depcomp: ensure make_ok() fails when run_make fails
12cff5a
12cff5a
While running automake tests with -std-gnu=c99, the compiler report
12cff5a
errors which lead to make to fail. Yet, these failures are ignored
12cff5a
during the tests, which considers them to be successful as stderror is
12cff5a
check for one specific pattern.
12cff5a
12cff5a
If make fails, investigation should be made to discover why, whatever
12cff5a
the reason for the failure is.
12cff5a
12cff5a
* t/ax/depcomp.sh: Make make_ok fail when make fails.
12cff5a
---
12cff5a
 t/ax/depcomp.sh | 2 +-
12cff5a
 1 file changed, 1 insertion(+), 1 deletion(-)
12cff5a
12cff5a
diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh
12cff5a
index 3c4db10e3..7a3ac63a7 100644
12cff5a
--- a/t/ax/depcomp.sh
12cff5a
+++ b/t/ax/depcomp.sh
12cff5a
@@ -160,7 +160,7 @@ case $depcomp_with_libtool in
12cff5a
     echo lib_LTLIBRARIES = libfoo.la >> Makefile.am
12cff5a
     make_ok ()
12cff5a
     {
12cff5a
-      run_make -M -- ${1+"$@"}
12cff5a
+      run_make -M -- ${1+"$@"} || return 1
12cff5a
       $FGREP 'unknown directive' output && return 1
12cff5a
       rm -f output
12cff5a
       # Checks for stray files possibly left around by less common
12cff5a
-- 
12cff5a
2.39.1
12cff5a