git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gettext tests: remove old sanity test under NO_GETTEXT

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 2, 2010, 15:02 UTC
Message-ID
<1283439765-4622-1-git-send-email-avarab@gmail.com>
In-Reply-To
<7vpqww435o.fsf@alter.siamese.dyndns.org>

Remove an old sanity test that checked that the share/locale dir didn't exist if we compiled with NO_GETTEXT=YesPlease. This would break if the user did:

    git clean -dxf
    make NO_GETTEXT=
    make NO_GETTEXT=YesPlease
    make test

This test was something to test very basic sanity back when I was first developing the gettext series, but it's not needed anymore. We don't have similar tests for other parts of git to check that we didn't build something with a given feature disabled.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
On Thu, Sep 2, 2010 at 14:43, Junio C Hamano <gitster@pobox.com> wrote:
Show 25 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> It's failing because you compiled without gettext, but you still have
>> an old /share/locale dir hanging around. I.e. you built from an old
>> build dir without first doing make clean.
>
> If a user did the following:
>
>    $ rm -fr /tmp/w-gettext /tmp/wo-gettext
>    $ make clean
>    $ make PREFIX=/tmp/w-gettext test install
>    $ make PREFIX=/tmp/wo-gettext NO_GETTEXT=NoThanks test install
>
> I think there should be something that causes stale stuff in the build
> directory:
>
>    (1) not to be installed to the final destination and;
>
>    (2) not to interfere with the running of test,
>
> somewhere in the last make procedure.  Here "stale stuff" is not
> necessarily limited to share/locale.
>
> I think you already have arranged the first to happen correctly; I see
> "ifndef NO_GETTEXT" in the "install" target.

It's best just to remove the test. It was only there to test /really/ basic sanity in the past while I was still actively hacking the Makefile.

 t/t0200-gettext-basic.sh |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/t/t0200-gettext-basic.sh b/t/t0200-gettext-basic.sh
index 3846ea8..8853d8a 100755
--- a/t/t0200-gettext-basic.sh
+++ b/t/t0200-gettext-basic.sh
@@ -39,11 +39,6 @@ test_expect_success GETTEXT 'sanity: Icelandic locale was compiled' '
     test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
 '
 
-test_expect_success NO_GETTEXT "sanity: \$TEXTDOMAINDIR doesn't exists with NO_GETTEXT=YesPlease" '
-    ! test -d "$TEXTDOMAINDIR" &&
-    test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
-'
-
 # TODO: When we have more locales, generalize this to test them
 # all. Maybe we'll need a dir->locale map for that.
 test_expect_success GETTEXT_LOCALE 'sanity: gettext("") metadata is OK' '
-- 
1.7.2.2.588.g61cd1
Message 1 of 1 in “gettext tests: remove old sanity test under NO_GETTEXT”
  1. gettext tests: remove old sanity test under NO_GETTEXTÆvar Arnfjörð Bjarmason, Sep 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.