1 use crate::{parser::Pattern, rustc_stderr::Message, Mode}
;
2 use std
::{path::PathBuf, process::ExitStatus}
;
4 /// All the ways in which a test can fail.
7 /// Got an invalid exit status for the given mode.
11 /// The exit status of the command.
13 /// The expected exit status as set in the file or derived from the mode.
16 /// A pattern was declared but had no matching error.
18 /// The pattern that was missing an error
20 /// The line in which the pattern was defined.
21 definition_line
: usize,
23 /// A ui test checking for failure does not have any failure patterns
25 /// A ui test checking for success has failure patterns
26 PatternFoundInPassTest
,
27 /// Stderr/Stdout differed from the `.stderr`/`.stdout` file present.
29 /// The file containing the expected output that differs from the actual output.
31 /// The output from the command.
33 /// The contents of the file.
35 /// A command, that when run, causes the output to get blessed instead of erroring.
36 bless_command
: String
,
38 /// There were errors that don't have a pattern.
39 ErrorsWithoutPattern
{
40 /// The main message of the error.
42 /// File and line information of the error.
43 path
: Option
<(PathBuf
, usize)>,
45 /// A comment failed to parse.
49 /// THe line in which it was defined.
52 /// A subcommand (e.g. rustfix) of a test failed.
54 /// The name of the subcommand (e.g. "rustfix").
56 /// The exit status of the command.
59 /// This catches crashes of ui tests and reports them along the failed test.
61 /// An auxiliary build failed with its own set of errors.
63 /// Path to the aux file.
65 /// The errors that occurred during the build of the aux file.
67 /// The line in which the aux file was requested to be built.
72 pub(crate) type Errors
= Vec
<Error
>;