Skip to contentSkip to conversation

gettext tests: remove old sanity test under NO_GETTEXT

PATCH New Ævar Arnfjörð Bjarmason 1 participant 1 message Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 gettext tests: remove old sanity test under NO_GETTEXT

In reply to a message not in the archive

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.

---

Quoted 18 lines · Junio C Hamano
Quoted 3 lines · Ævar Arnfjörð Bjarmason

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;

Quoted 7 lines

(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(-)
t/t0200-gettext-basic.sh +0 -5
index 3846ea8..8853d8a 100755
@@ -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' '
Signature · 1 line
1.7.2.2.588.g61cd1