Closed kloczek closed 1 year 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
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.
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,
OK. Thx 👍 How to skip that unit?
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?
To be honet I fdon't see to much sense to test LaTeX in po4a.
Well, that's one of the supported format...
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?
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.
What about prepare simplest possible LaTeX document with strings to translate without additional class files? 🤔
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.
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.
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 ;)
Hmm .. 🤔
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.
I'm closing this issue because I don't have enough information to handle it. Feel free to reopen with additional info on need.
Looks like something new have been introduced in 0.67