Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustfix coverage: Skip UI tests with non-json error-format #59677

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/tools/compiletest/src/runtest.rs
Expand Up @@ -2820,12 +2820,15 @@ impl<'test> TestCx<'test> {
// don't test rustfix with nll right now
} else if self.config.rustfix_coverage {
// Find out which tests have `MachineApplicable` suggestions but are missing
// `run-rustfix` or `run-rustfix-only-machine-applicable` headers
// `run-rustfix` or `run-rustfix-only-machine-applicable` headers.
//
// This will return an empty `Vec` in case the executed test file has a
// `compile-flags: --error-format=xxxx` header with a value other than `json`.
let suggestions = get_suggestions_from_json(
&proc_res.stderr,
&HashSet::new(),
Filter::MachineApplicableOnly
).unwrap();
).unwrap_or_default();
if suggestions.len() > 0
&& !self.props.run_rustfix
&& !self.props.rustfix_only_machine_applicable {
Expand Down