Support xfail/skip of optional, format, next tests #97
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.
So... I recall starting this idea while coming down with COVID, but didn't realize I'd mostly gotten it working. So here's my last leftover old branch :-) The idea here is to document the optional/format/draft-next support and enable it in PR test runs (which I'll post as a separate PR) in order to get the coverage numbers for PRs like #93 (draft-next
contains
, etc., which currently fails the coverage checks because the new code is only covered by draft-next tests).Maintaining this data manually is impractical, so of course I had to write an elaborate system to automate it 😅 @marksparkza I will not be bothered if you decide this is more trouble than it's worth, but it does work. It's also nice when looking at implementations to see what (if any) optional features and formats are supported in case any of that is needed for someone's use case. But it is kind of a lot.
Commit message:
This adds infrastructure to generate a JSON file flagging which optional, format, and/or draft-next tests are expected to fail ("xfail") or have a bug that requires skipping them ("skip"). The file includes both the status to annotate the test, as well as the reason.
The --testsuite-generate-status option will run all tests and update the JSON file based on the current failures. It will leave in place existing entries for failures so as not to overwrite and custom statuses or reasons. It will remove entries for tests that now pass.
Failing cases are set to "xfail" with an appropriate generic reason (format, optional, or draft-next, in that order of precedence). To skip a test, or provide a custom reason, edit the file manually.
This commit also includes documentation in in the CONTRIBUTING file for test options I added a while back but apparently forgot to document.