Sanjoy Mahajan wrote:
Here is what has come up from the regression testing. [I'll send them one issue/email.]
If a texexec job runs out of time (--timeout=NN), the exit code should be nonzero. Right now it's zero; which, I just realized, had slightly confused the error handling by the regression-testing.
def timedrun(delay, &block) delay = delay.to_i rescue 0 if delay > 0 then begin report("job started with timeout '#{delay}'") timeout(delay) do yield block end rescue TimeoutError report("job aborted due to timeout '#{delay}'") setvariable('error','timeout') rescue report("job aborted due to error") setvariable('error','fatal error') else report("job finished within timeout '#{delay}'") end else yield block end end should do that (in base/tex.rb)
Here's an example using one of the problematic files in the test repo. [Send the output to a file because it's grows to 14MB.] This command
texexec --nonstopmode --timeout=10 tex/context/base/unic-002.tex/test-001.tex
exits with error code 0, but this one
texexec --nonstopmode tex/context/base/unic-002.tex/test-001.tex
exits with error code 1. Maybe if it times out it should exit with its own code (who knows, maybe 23?).
[I'm testing the above with 2007.01.23]
So I wrote a short Python script (utils/run-it.py in the repo) to handle maximum time and maximum filesize, which the Makefile now uses to wrap the texexec call.
-Sanjoy
`A nation of slaves is always prepared to applaud the clemency of their master who, in the abuse of absolute power, does not proceed to the last extremes of injustice and oppression.' (Gibbon) _______________________________________________ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------