mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
127 stars 62 forks source link

0.67: test suite is failing #372

Closed kloczek closed 1 year ago

kloczek commented 2 years ago

Looks like something new have been introduced in 0.67

+ cd po4a-0.67
+ LANG=C.utf8
+ ./Build test
t/00-perms.t .......... ok
t/01-classes.t ........ ok
t/12-msguntypot.t ..... ok
t/13-plural.t ......... ok
t/add.t ............... ok
t/cfg-args.t .......... ok
t/cfg-multi.t ......... ok
t/cfg-single.t ........ ok
t/cfg-split.t ......... ok
t/charset.t ........... ok
t/core-porefs.t ....... ok
t/fmt-asciidoc.t ...... ok
t/fmt-docbook.t ....... ok
t/fmt-halibut.t ....... ok
t/fmt-ini.t ........... ok
t/fmt-man.t ........... ok
t/fmt-pod.t ........... ok
t/fmt-rubydoc.t ....... ok
t/fmt-sgml.t .......... ok
t/fmt-tex.t ........... 1/?
    #   Failed test 'Provided command (retcode: 256)'
    #   at t/Testhelper.pm line 140.
    # Produced file tmp/fmt/tex:
    # (end of tmp/fmt/tex)
    # -------------------------------------------------------------
    # Looks like you failed 1 test of 5.

#   Failed test 'Format fmt/tex/theorem.tex'
#   at t/Testhelper.pm line 521.
# Looks like you failed 1 test of 2.
t/fmt-tex.t ........... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
t/fmt-texinfo.t ....... ok
t/fmt-txt-fortunes.t .. ok
t/fmt-txt-markdown.t .. ok
t/fmt-txt.t ........... ok
t/fmt-wml.t ........... ok
t/fmt-xhtml.t ......... ok
t/fmt-xml-dia.t ....... ok
t/fmt-xml.t ........... ok
t/fmt-yaml.t .......... ok
t/gettextize.t ........ ok
t/pod.t ............... skipped: Test::Pod required for testing POD

Test Summary Report
-------------------
t/fmt-tex.t         (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=31, Tests=337, 123 wallclock secs ( 1.16 usr  0.21 sys + 701.60 cusr 39.91 csys = 742.88 CPU)
Result: FAIL
Failed 1/31 test programs. 1/337 subtests failed.
mquinson commented 2 years ago

Hello Tomacz, can you please provide some more details (OS, etc)?

Also, the output of ./Build test --test_files=t/fmt-tex.t verbose=1 would be useful.

Thanks for your feedback, Mt

kloczek commented 2 years ago

Here it is

[tkloczko@devel-g2v po4a-0.67]$ ./Build test --test_files=t/fmt-tex.t verbose=1
t/fmt-tex.t ..
# Subtest: Format fmt/tex/basic.tex
    # Change directory to fmt/tex
    ok 1 - Normalizing Format fmt/tex/basic.tex
    #   Pass: perl po4a-normalize -f latex --quiet --pot t/tmp/fmt/tex/basic.pot --localized t/tmp/fmt/tex/basic.norm  basic.tex > t/tmp/fmt/tex/basic.norm.stderr 2>&1 (retcode: 0)
    ok 2 - Translating Format fmt/tex/basic.tex
    ok 3 -   Command: perl BUILDPATH/po4a-translate -f latex  --master basic.tex --po BUILDPATH/t/fmt/tex/basic.po --localized BUILDPATH/t/tmp/fmt/tex/basic.trans > BUILDPATH/t/tmp/fmt/tex/basic.trans.stderr 2>&1
    ok 4 - perl BUILDPATH/po4a-updatepo -f latex  --master basic.tex --po BUILDPATH/t/tmp/fmt/tex/basic.po_updated > BUILDPATH/t/tmp/fmt/tex/update.stderr 2>&1
    # Change directory back to /home/tkloczko/rpmbuild/BUILD/po4a-0.67/t
    ok 5 - diff -uNwB fmt/tex/basic.norm.stderr BUILDPATH/t/tmp/fmt/tex/basic.norm.stderr  > tmp/fmt/tex/basic.cmd_output 2>&1
    ok 6 - diff -u -I'^"Project-Id-Version:' -I'^"POT-Creation-Date:' -I'^"PO-Revision-Date:' -I'^\# [^[:blank:]]* translations for ' -I'^\# Language [^[:blank:]]* translations for ' -I'Copyright (C) 20.. Free Software Foundation, Inc.' -I'^\# This file is distributed under the same license as the' -I'^\# Automatically generated, 20...'    fmt/tex/basic.pot  tmp/fmt/tex/basic.pot  > tmp/fmt/tex/basic.cmd_output 2>&1
    ok 7 - diff -u fmt/tex/basic.norm   tmp/fmt/tex/basic.norm  > tmp/fmt/tex/basic.cmd_output 2>&1
    ok 8 - diff -uNwB fmt/tex/basic.trans.stderr tmp/fmt/tex/basic.trans.stderr  > tmp/fmt/tex/basic.cmd_output 2>&1
    ok 9 - diff -uN fmt/tex/basic.trans tmp/fmt/tex/basic.trans  > tmp/fmt/tex/basic.cmd_output 2>&1
    ok 10 - diff -u -I'^"Project-Id-Version:' -I'^"POT-Creation-Date:' -I'^"PO-Revision-Date:' -I'^\# [^[:blank:]]* translations for ' -I'^\# Language [^[:blank:]]* translations for ' -I'Copyright (C) 20.. Free Software Foundation, Inc.' -I'^\# This file is distributed under the same license as the' -I'^\# Automatically generated, 20...'   fmt/tex/basic.po tmp/fmt/tex/basic.po_updated  > tmp/fmt/tex/basic.cmd_output 2>&1
    1..10
ok 1 - Format fmt/tex/basic.tex
# Subtest: Format fmt/tex/theorem.tex
    # Change directory to fmt/tex
    ok 1 - Normalizing Format fmt/tex/theorem.tex
    #   Pass: perl po4a-normalize -f latex --quiet --pot t/tmp/fmt/tex/theorem.pot --localized t/tmp/fmt/tex/theorem.norm  theorem.tex > t/tmp/fmt/tex/theorem.norm.stderr 2>&1 (retcode: 0)
    ok 2 - Translating Format fmt/tex/theorem.tex
    ok 3 -   Command: perl BUILDPATH/po4a-translate -f latex  --master theorem.tex --po BUILDPATH/t/fmt/tex/theorem.po --localized BUILDPATH/t/tmp/fmt/tex/theorem.trans > BUILDPATH/t/tmp/fmt/tex/theorem.trans.stderr 2>&1
    ok 4 - perl BUILDPATH/po4a-updatepo -f latex  --master theorem.tex --po BUILDPATH/t/tmp/fmt/tex/theorem.po_updated > BUILDPATH/t/tmp/fmt/tex/update.stderr 2>&1
    # Change directory back to /home/tkloczko/rpmbuild/BUILD/po4a-0.67/t
    not ok 5 - Provided command (retcode: 256)

    #   Failed test 'Provided command (retcode: 256)'
    #   at t/Testhelper.pm line 140.
    # Expected retcode: 0
    # FAILED command: diff -uNwB fmt/tex/theorem.norm.stderr BUILDPATH/t/tmp/fmt/tex/theorem.norm.stderr  > tmp/fmt/tex/theorem.cmd_output 2>&1
    # Command output:
    # | --- fmt/tex/theorem.norm.stderr 1970-01-01 00:00:00.000000000 +0000
    # | +++ /home/tkloczko/rpmbuild/BUILD/po4a-0.67/t/tmp/fmt/tex/theorem.norm.stderr   2022-07-15 02:44:02.972094324 +0000
    # | @@ -0,0 +1 @@
    # | +po4a::tex: kpsewhich cannot find article.cls
    # (end of output)
    # Produced file tmp/fmt/tex:
    # (end of tmp/fmt/tex)
    # -------------------------------------------------------------
    1..5
    # Looks like you failed 1 test of 5.
not ok 2 - Format fmt/tex/theorem.tex

#   Failed test 'Format fmt/tex/theorem.tex'
#   at t/Testhelper.pm line 521.
1..2
# Looks like you failed 1 test of 2.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests

Test Summary Report
-------------------
t/fmt-tex.t (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=2,  1 wallclock secs ( 0.03 usr  0.01 sys +  1.06 cusr  0.32 csys =  1.42 CPU)
Result: FAIL
Failed 1/1 test programs. 1/2 subtests failed.
mquinson commented 2 years ago

Hello,

so the error is not ours, is it? It seems to me that you have a LaTeX installation that does not provide the article class. I did not even knew that it was possible. If you still think that it's our fault, then you need to provide more information about your OS/distro, etc. I'd also be curious to see if you can compile a simple LaTeX document on this machine.

Thanks for your feedback,

kloczek commented 2 years ago

OK. Thx 👍 How to skip that unit?

mquinson commented 2 years ago

I'm not sure it's possible. Maybe you want to dig in the doc of Test::More to find out? Another possibility is to install the dependency that you are missing?

kloczek commented 2 years ago

To be honet I fdon't see to much sense to test LaTeX in po4a.

mquinson commented 2 years ago

Well, that's one of the supported format...

jnavila commented 2 years ago

I understand @kloczek 's point as : po4a only translates files, so why is it looking for the file of template referenced in the document? What is it needed for?

mquinson commented 2 years ago

po4a parses every input file of LaTeX, searching for inline customization. It uses kpsewhich to find the input files as it should.

We could add an exception to not search for article.cls, but then we should test for another class file, possibly one testing a class file providing inline customization.

kloczek commented 2 years ago

What about prepare simplest possible LaTeX document with strings to translate without additional class files? 🤔

mquinson commented 2 years ago

again, article.cls IS the simplest LaTeX class, AFAIK.

@kloczek could you please comment on your OS and everything? I fail to understand how you can have kpsewhich without article.cls. I may well misunderstand something here and would be glad to be enlightened.

I'm not opposed to PR that would make the test pass when article.cls is not installed, but I don't feel like implementing it myself. Help yourselves, guys.

kloczek commented 2 years ago

I'm using my own distribution which is close to fedora and at the same time way ahead of that distro. I'm building each of my packages in lxc zone spawned to build only single package. Build env is based on smallest possible system image on top of which are added only packages which are mentioned in rpm spec files BuildRequires. From that point of view I'm carying how much is added on top of that base image. SImple prev version po4a was able to pass test suite with opny texlive-kpathsea so I was surprised that new version started require more LaTeX components.

mquinson commented 2 years ago

We didn't change anything around the LaTeX format in po4a since maybe 10 years, which is why I'm not a big fan of modifying it myself to fit your very specific needs. Can you still build eg the 0.66 version with your setup? I'd be surprised, because I suspect a change in the distro you're using ;)

kloczek commented 2 years ago

Hmm .. 🤔

mquinson commented 2 years ago

Hello @kloczek, sorry for being pushy, but I think that this issue is invalid and I'll probably close it at some point unless you provide more information about what's wrong with the current state.

Thanks for reporting, and thanks for any additional info that you could bring in.

mquinson commented 1 year ago

I'm closing this issue because I don't have enough information to handle it. Feel free to reopen with additional info on need.