Skip to content

Always move test outs even if there are test args or failures#3550

Merged
toastwaffle merged 2 commits into
thought-machine:masterfrom
chris-franklin:move-files
Jul 21, 2026
Merged

Always move test outs even if there are test args or failures#3550
toastwaffle merged 2 commits into
thought-machine:masterfrom
chris-franklin:move-files

Conversation

@chris-franklin

@chris-franklin chris-franklin commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

In the test step there is a moveAndCacheOutputFiles local function that's called if all test cases succeed. It exits early if any arguments were passed to the test, with the stated reason being that results shouldn't be cached if args were passed.

The problem is that while it does prevent caching, it also prevents the files being moved to the output dir. This is unhelpful because those output files are not invalidated by the passing of args, indeed sometimes arguments are passed precisely so they are produced. Those files can also be helpful in diagnosing failures.

This diff refactors the helpers to separate moving output files from the caching: files are always moved even when there are failures, but the original checks are still there and do prevent those files being cached. Moving the test results file is still kept behind the check because Please treats it as a cache of test results.

In the test step there is a `moveAndCacheOutputFiles` local function that's
called if all test cases succeed. It exits early if any arguments were passed to
the test, with the stated reason being that results shouldn't be cached if
args were passed.

The problem is that while it does prevent caching, it also prevents the files
being copied to the output dir. This is unhelpful because those output files
are not invalidated by the passing of args, indeed sometimes arguments are
passed precisely //so// they are produced. Those files can also be helpful in
diagnosing failures.

This diff refactors the helpers to separate moving output files from the
caching: files are always moved even when there are failures, but the original
checks are still there and do prevent those files being cached.
@chris-franklin
chris-franklin marked this pull request as ready for review July 21, 2026 12:30
@toastwaffle
toastwaffle merged commit bd5579d into thought-machine:master Jul 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants