[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emacs-wgrep is marked for autoremoval from testing



Hi Jeremy,

Jeremy Sowden <jeremy@azazel.net> writes:

> The tests were failing when I ran either:
>
>     schroot -c sid -- fakeroot debian/rules clean binary
>
> which runs in an up-to-date Unstable schroot LVM snapshot chroot, or:
>
>     gbp buildpackage --git-pbuilder
>
> which runs in an up-to-date Unstable cowbuilder chroot.  When I tried an
> Unstable sbuild chroot that I have on the same host, the tests passed.
> They had also passed when I ran the tests in the host system, which is
> running Testing.  I created a fresh Unstable cowbuilder chroot, but
> using that didn't help.  Eventually, I tracked the problem down to
> locale settings in the environment.  In the schroot chroot, `LANG` is
> not set; in the cowbuilder chroot it is set to `C`; whereas in the
> sbuild chroot, which inherits it from my environment in the host system,
> it is `en_GB.UTF-8`.
>
> Compare:
>
>     $ schroot -c sid -- env LANG=C.UTF-8 emacs -batch -l wgrep.el \
>     > -l wgrep-test-helper.el -l wgrep-test.el \
>     > -eval '(ert-run-tests-batch-and-exit "wgrep-bom-with-unibyte")'
>     Loading /etc/emacs/site-start.d/00debian.el (source)...
>     Loading /etc/emacs/site-start.d/50autoconf.el (source)...
>     Running 1 tests (2024-01-07 14:07:46+0000, selector ‘"wgrep-bom-with-unibyte"’)
>
>     Grep finished with matches found
>     Press C-x C-s when finished or C-c C-k to abort changes.
>     Writing 1 files, 0 files are left...
>     Successfully finished. (1 changed)
>     Buffer has been saved.
>        passed  1/1  wgrep-bom-with-unibyte (0.911896 sec)
>
>     Ran 1 tests, 1 results as expected, 0 unexpected (2024-01-07 14:07:46+0000, 0.912041 sec)
>
> and:
>
>     $ schroot -c sid -- env LANG=C emacs -batch -l wgrep.el \
>     > -l wgrep-test-helper.el -l wgrep-test.el \
>     > -eval '(ert-run-tests-batch-and-exit "wgrep-bom-with-unibyte")'
>     Loading /etc/emacs/site-start.d/00debian.el (source)...
>     Loading /etc/emacs/site-start.d/50autoconf.el (source)...
>     Running 1 tests (2024-01-07 14:10:21+0000, selector `"wgrep-bom-with-unibyte"')
>
>     Grep finished with matches found
>     Press C-x C-s when finished or C-c C-k to abort changes.
>     Writing 1 files, 0 files are left...
>     There is an unapplied change. (0 changed)
>     No buffer has been saved.
>     Test wgrep-bom-with-unibyte backtrace:
>       [...]
>     Test wgrep-bom-with-unibyte condition:
>         (ert-test-failed
>          ((should
>            (equal "ABCD\nb\n"
>                   (wgrep-test-helper--get-contents file)))
>           :form
>           (equal "ABCD\nb\n" "a\nb\n")
>           :value nil :explanation
>           (arrays-of-different-length 7 4 "ABCD\nb\n" "a\nb\n" first-mismatch-at 0)))
>        FAILED  1/1  wgrep-bom-with-unibyte (0.943495 sec) at wgrep-test.el:77
>
>     Ran 1 tests, 0 results as expected, 1 unexpected (2024-01-07 14:10:22+0000, 1.124888 sec)
>
>     1 unexpected results:
>        FAILED  wgrep-bom-with-unibyte
>
> Not sure what the moral of this tale is yet, but in any case, the
> problem is unrelated to your packaging (and I see the same behaviour
> using the .orig tar-ball).
>
> J.
>

Thanks very much for tracking this down!  I have reproduced this in a
newly created cowbuilder (in fact both multibyte and unibyte tests
failed), and tested that setting LC_ALL to C.UTF-8 indeed fixes this
issue.  After a failed attempt to use "setenv" in the test fixture in
wgrep-test, I resorted to override elpa test to set LC_ALL which worked
for my cowbuilder.

The new changes are now pushed to team repo and a new package is dput to
mentors.  PTAL, TIA!

-- 
Xiyue Deng

Attachment: signature.asc
Description: PGP signature


Reply to: