Commit 69a1e26
authored
JUnit XML recorder should ignore warning issues (#986)
This updates `Event.JUnitXMLRecorder` to ignore `Issue` instances whose
`severity` is less than `.error` (such as `.warning`).
### Motivation:
The concept of issue severity was recently added in #931 (but was
reverted and re-landed in #952), and that did not adjust the JUnit XML
recorder logic. The JUnit XML schema we currently attempt to adhere to
does not appear to have a way to represent non-fatal issues, so I think
it would be best for now to ignore these issues.
### Modifications:
- Implement the fix and a validating unit test.
- (Drive-by) Fix a nearby test I noticed wasn't actually working as
intended and wasn't properly validating the fix it was intended to.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.1 parent 0c84d57 commit 69a1e26
File tree
3 files changed
+29
-9
lines changed- Sources/Testing/Events/Recorder
- Tests/TestingTests
- TestSupport
3 files changed
+29
-9
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
471 | 470 | | |
472 | 471 | | |
473 | | - | |
474 | | - | |
475 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
476 | 495 | | |
| 496 | + | |
| 497 | + | |
477 | 498 | | |
478 | | - | |
479 | 499 | | |
480 | 500 | | |
481 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
372 | | - | |
| 371 | + | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
0 commit comments