Support interpolating {base} in JUNIT env settings #29
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.
There are a few pre-factor commits, this is the main one: c355987
In a monorepository of multiple packages using JUnit, there is no way*
(via ENV configuration) to avoid each package overwriting the lasts test
file, since anything you set will be used uniformly by all the test
suites, as they are a single process.
By adding a very simple interpolation of
{base}
by the basename of thecurrent directory, this can be avoided without resorting to in-code
configuration by setting something like
JUNIT_OUTPUT_NAME={base}.xml
.Arguably, that would be a better default than the current
junit.xml
,but moving to that would be a breaking change, and incorporating
{base}
generally through all the settings feels useful anyway.*That is, while also using a custom directory. It does Just Work with defaults because
./junit.xml
is actually package-local already. It's only when you try to changethe directory to (e.g.)
/tmp/junit
that there's no way to prevent the collisionwithout being able to incorporate that package name somewhere.