Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An alternative implementation to #42 that maybe solves issues with removing old test output.
The problem can be described with this example:
If we write an output file to
fixture/a/b/c/foo.bar
, currently we will set the directory modification time ofc
to the value of the variablets
, this also changes the modification time for every parent ofc
. Which means that if we also run a test inb
we will see a later modification time for the folderb
and hence clean that directory, removingc
and any output inb
.An alternative solution to this problem (other than the one given in this PR) could be to set the directory modification time for every directory between fixtureDir and the test dir. i.e. in the example above, when writing output to
c
, set the modification timestamp forb
anda
as well.