-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recent change seems to have rendered documented way to call biber
not working
#327
Comments
I was using 'filler' text here as it seemed safe, but we can change that. But that still leaves the issue that if you are trying in the hook to save state changes, we can't check if it's got an empty return value. Should we document something? |
I'm not sure I understand the reason for the commit, but if the comment:
is the reason, shouldn't you use the same arguments as the actual call? if errlevels[i] == 0 and runtest_tasks(jobname(lvtfile),i) ~= "" then
local errorlevel =
runcmd(preamble .. runtest_tasks(jobname(lvtfile),i),testdir)
if errorlevel ~= 0 then errlevels[i] = errorlevel end
end I'm not sure what you were trying to do, or what you mean by "if you are trying in the hook to save state changes" (I assume you have a use case in mind). I just know the change rendered the documented way of doing things not to work anymore, and that's what I reported. |
Thank you! |
I'd forgotten we'd documented that |
I just (well, the test started failing a few days ago, but I just got round to looking at it) ran into a very similar issue with my I even tried function runtest_tasks (name,run)
return "biber " .. name
end but no joy. |
@moewew Theoretically, it should be working, as long as you have the latest update. The fix did work. However, in my experience, after I got the update, most of my |
@moewew, @gusbrs What's happening here is that we needed to split the test run into the main part and (optionally) the extra tasks; in the past the extra tasks always ran. So if the main run gives a non-zero errorlevel, we now don't run the extra tasks. That doesn't seem unreasonable - if you need post-run tasks, they likely need the main run to finish correctly. |
My first reaction was in agreement, and I'm happy I corrected the blatant errors in my test files. But isn't deliberately generating an error a legitimate technique in tests (e.g. the |
Hmm, I'm using lots of |
@moewew you could redirect the box content into an external file and read that in again. Imho that shouldn't led a non-zero exit code:
|
If that works, we could provide a command like \SHOWBOX that encaps that workflow, couldn't we? |
@u-fischer Thanks. That appears to work and is a very clever trick. I hope you don't mind me saying that it doesn't feel particularly elegant, but since I've packed it up into a macro, I don't have to worry about that too much. |
@moewew that's why I suggested that the test support code should offer such a macro so that one has a clean interface for such testing. I therefore reopen that issue, to consider this as an enhancement |
The problem described in (current) title of this issue has been resolved. Maybe trace the new/follow-up problem reported in #327 (comment) in a new issue?
Update: I opened #336. |
One option would be to change back to running any extra tasks ignoring the exit code of the main run. I included the check as I'd imaged that people using an external tool would arrange that any tests only took place after the external tool had run, so something like \IfFileExists{output-of-tool}
{\def\testoutput#1{Some-useful-payload}}
{\def\testoutput#1{}} but that was likely naïve. Almost all of the time there are no extras, so simply running irrespective of errorlevel is not going to impact on almost all users of |
I'm going to go with this plan - I think on balance it's safest. |
I think the commit responsible is 4d8e5d9 .
In practice, I observed all of my tests involving
biblatex
to fail (they had been working a couple of days prior). Diffs and some investigation suggestedbiber
was not being called at all.My
build.lua
is pretty standard in that regard, and follows almost to the letter the documented recipe for the purpose:I modified this to include:
With this change the tests passed again (meaning
biber
ran).So the fact that
runtest_tasks
is being called with args("X",0)
makesif run == 1
return false.Also, in my actual use case, I also test for the
name
arg, with:In this case, even if I force
run = 1
as above that fails again (biber
is not called) because, not surprisingly, "X" does not match the name of the test.The text was updated successfully, but these errors were encountered: