Re: [PATCH 2/2] allow keeping output of potentially failed tests
From:
Martin D Kealey
Subject:
Re: [PATCH 2/2] allow keeping output of potentially failed tests
Date:
Thu, 16 Oct 2025 23:52:52 +1300
On Tue, 7 Oct 2025 at 23:55, Alexander Bantyev <alexander.bantyev@tweag.io>
wrote:
> Previously if a test produced a diff, the only way to fix it was to
> inspect the test output.
>
And in some cases, it's non-trivial to figure out which test input
corresponds to which expected output.
(I'm working on a patch to rationalise the test harness framework, which
will make this a *lot* simpler.)
We introduce the BASH_TSTOUT_KEEPDIR environment variable which is
> expected to point to a directory.
> If set, that directory will be populated with output from all failed
> tests, with test names as file names.
>
> This makes debugging or updating the expected test outputs easier.
>
Whilst I like the idea of keeping the output, this approach seems a bit
backwards.
Rather, arrange for each test's output to be written to a separate file in
a per-run directory, and then if we *don't* want to keep the output, remove
the whole directory.
I'll work up a patch to do this.
-Martin