From: Leo B. <Leo...@um...> - 2025-04-07 17:31:15
|
On Mon, Apr 07 2025, Robert Dodier <rob...@gm...> wrote: > On Mon, Apr 7, 2025 at 2:29 AM Michel Talon <ta...@lp...> wrote: > >> In fact to arrange that your scripts get killed with an exit error as soon as there is an error in them you can do the following, for sbcl. > > Along these lines, I seem to recall that there was in the > not-too-distant past some discussion about getting Maxima to exit with > a nonzero exit code when an error is encountered while processing > noninteractively (via --batch at least, maybe other means). Did > someone make some progress on that? I think it's a great idea, but I > didn't work on it myself. Yes, it is in current HEAD. On other hand, I think this user is asking for something a bit different, since one wants the whole testsuite to finish and then Maxima should exit with exit code equal to the number of (unexpected) errors in the test file. The attached patch implements such a function. Here is how it works: $ ./maxima-local -p src/mload.lisp --no-init --batch-string='quit(batch_test("tests/rtest1.mac"));' . . . The following 2 problems failed: (183 186) $ echo $? 2 WDYT? (Aside from the fact that the testsuite is failing on current HEAD). Leo |