]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid lang-vala failure on macOS with MacPorts.
authorBruno Haible <bruno@clisp.org>
Tue, 15 Jun 2021 08:32:19 +0000 (10:32 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
* gettext-tools/tests/lang-vala: Skip the test if the valac invocation reports
that <glib.h> is not installed.

gettext-tools/tests/lang-vala

index b24de6a676f51d4499d219c4be4bf7228399c970..bf04f8edc923e1a1e264cad72d940334dc4860f7 100755 (executable)
@@ -23,7 +23,12 @@ test $? -le 1 \
 
 : ${VALAC=valac}
 ${VALAC} --Xcc=-DGETTEXT_PACKAGE=\"prog\" prog.vala 2>prog.err \
-  || { cat prog.err 1>&2; Exit 1; }
+  || { if grep "fatal error: 'glib\.h' file not found" < prog.err > /dev/null; then
+         echo "Skipping test: valac installation incomplete"; Exit 77
+       else
+         cat prog.err 1>&2; Exit 1
+       fi
+     }
 
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} -o prog.tmp --omit-header --no-location prog.vala || Exit 1