|
1 | | -use crate::{ |
2 | | - CommandOutput, |
3 | | - CommandOutputLine, |
4 | | - CommandStream, |
5 | | - Report, |
6 | | - TLine, |
7 | | -}; |
8 | | - |
9 | | -use super::{ |
10 | | - Analyzer, |
11 | | - LineType, |
12 | | - Stats, |
13 | | - standard::StandardAnalyzer, |
14 | | -}; |
| 1 | +use crate::{CommandOutput, CommandOutputLine, CommandStream, Report, TLine}; |
| 2 | + |
| 3 | +use super::{Analyzer, LineType, Stats, standard::StandardAnalyzer}; |
15 | 4 |
|
16 | 5 | #[derive(Debug, Default)] |
17 | 6 | pub struct NextestJSONAnalyzer { |
@@ -72,6 +61,7 @@ impl Analyzer for NextestJSONAnalyzer { |
72 | 61 | OutputLine::Test { event } => match event { |
73 | 62 | TestEvent::Started => (), |
74 | 63 | TestEvent::Ok { name: _ } => (), |
| 64 | + TestEvent::Ignored { name: _ } => (), |
75 | 65 | TestEvent::Failed { name, stdout } => { |
76 | 66 | let name = cleanup_name(&name); |
77 | 67 | report.lines.push(crate::Line { |
@@ -111,6 +101,7 @@ enum TestEvent { |
111 | 101 | Started, |
112 | 102 | Ok { name: String }, |
113 | 103 | Failed { name: String, stdout: String }, |
| 104 | + Ignored { name: String }, |
114 | 105 | } |
115 | 106 |
|
116 | 107 | #[derive(Debug, serde::Deserialize, serde::Serialize, PartialEq)] |
@@ -154,11 +145,7 @@ enum OutputLine { |
154 | 145 |
|
155 | 146 | #[cfg(test)] |
156 | 147 | mod test { |
157 | | - use super::{ |
158 | | - OutputLine, |
159 | | - SuiteEvent, |
160 | | - TestEvent, |
161 | | - }; |
| 148 | + use super::{OutputLine, SuiteEvent, TestEvent}; |
162 | 149 |
|
163 | 150 | #[test] |
164 | 151 | fn parse() { |
@@ -231,6 +218,17 @@ mod test { |
231 | 218 | } |
232 | 219 | } |
233 | 220 | ); |
| 221 | + |
| 222 | + let test_ignored = |
| 223 | + r#"{"type":"test","event":"ignored","name":"llvm::llvm$parser::test::var"}"#; |
| 224 | + assert_eq!( |
| 225 | + serde_json::from_str::<OutputLine>(test_ignored).unwrap(), |
| 226 | + OutputLine::Test { |
| 227 | + event: TestEvent::Ignored { |
| 228 | + name: "llm::llm$parser::test::var".to_owned(), |
| 229 | + } |
| 230 | + } |
| 231 | + ); |
234 | 232 | } |
235 | 233 |
|
236 | 234 | #[test] |
|
0 commit comments