slachiewicz opened a new pull request, #235:
URL: https://github.com/apache/ant/pull/235
There is currently nowhere to put a JUnit 5 test: the `junit` task cannot run
Jupiter, and `junitlauncher` is only exercised by the tests *of*
`junitlauncher`.
This adds a `jupiter-tests` target beside the existing run, so a Jupiter
test can
be written and will actually execute.
It is deliberately additive. The 356 existing test classes stay on the
`junit`
task, `junitreport` still aggregates only that task's XML, and the new target
writes its reports elsewhere. Nothing about the current reporting changes.
A single `selector` names the JUnit 5 tests. The `junit` batch excludes it
and
`jupiter-tests` includes it, so the two runners cannot pick up the same
class and
the list cannot drift out of step. `UnicodeUtilTest` moves across as the
first
one — otherwise the target would run nothing and silently keep passing.
Failures reuse `junit.failed`, so `check-failed` and `test` fail the build
exactly
as they already do. `legacy-plain` writes only to files, so the target
prints the
failing reports; the fileset selects nothing when the run passed.
### Why not switch the runner outright
That was the original intent, and it looks blocked. The `junit` run feeds
`junitreport`, which would mean moving to the `legacy-xml` listener — the
subject
of 69683, 69685, 69687 and 69707, two of which report that `junitreport`
cannot
correctly read what that listener writes. Switching wholesale would regress
this
project's own test reporting. Those look worth fixing first; this target
needs
none of them.
`errorproperty` also has no `junitlauncher` equivalent (70175), though it
does not
matter here since both properties already map to `junit.failed`.
### Verified
- `ant jupiter-tests` → `Tests run: 1, Failures: 0`.
- `ant junit-batch -Djunit.includes="**/UnicodeUtilTest.java"` → not picked
up by
the `junit` task; the same command with `SymlinkUtilsTest` does run it, so
the
exclusion is doing the work rather than the batch running empty.
- With the test deliberately broken: the assertion detail reaches the
console and
`junit.failed` → `tests.failed` → `fail` fires.
*This change was created with AI assistance.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]