From: Bruno Haible Date: Mon, 5 May 2025 10:24:52 +0000 (+0200) Subject: tests: Avoid a lang-modula2 failure. X-Git-Tag: v0.25~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2f29018a862476d6d484e299cb6a76f7c5f822;p=thirdparty%2Fgettext.git tests: Avoid a lang-modula2 failure. * gettext-tools/tests/lang-modula2: Skip the test if gm2 is not working. --- diff --git a/gettext-tools/tests/lang-modula2 b/gettext-tools/tests/lang-modula2 index b627b7616..dbdfb9e4a 100644 --- a/gettext-tools/tests/lang-modula2 +++ b/gettext-tools/tests/lang-modula2 @@ -5,10 +5,6 @@ # Assumes an fr_FR locale is installed. # Assumes the following packages are installed: gm2. -# Note: This test fails on Ubuntu 22.04, with a compilation error -# "error: the file containing the definition module 'Terminal' cannot be found", -# apparently due to insufficient include paths in this version of gm2. - # Test whether we can build and test Modula-2 programs. test "${MODULA2_CHOICE}" != no || { echo "Skipping test: configured with --disable-modula2" @@ -19,6 +15,21 @@ test "${BUILDMODULA2}" = yes || { Exit 77 } +# On Ubuntu 22.04, with gm2 version 11, we see a compilation error +# "error: the file containing the definition module 'Terminal' cannot be found", +# apparently due to insufficient include paths in this version of gm2. +cat <<\EOF > foo.mod +MODULE Prog; +FROM Terminal IMPORT WriteLn; +BEGIN + WriteLn; +END Prog. +EOF +${M2C} ${M2FLAGS} -o foo foo.mod || { + echo "Skipping test: Modula-2 compiler cannot find module 'Terminal'" + Exit 77 +} + cat <<\EOF > prog.mod MODULE Prog;