File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed
uefi-test-runner/src/proto/console Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: reconnect_serial_to_console;
2
- use uefi:: boot;
3
2
use uefi:: proto:: console:: serial:: { ControlBits , Serial } ;
4
- use uefi:: { Result , ResultExt , Status } ;
3
+ use uefi:: { boot , Result , ResultExt , Status } ;
5
4
6
5
// For the duration of this function, the serial device is opened in
7
6
// exclusive mode. That means logs will not work, which means we should
Original file line number Diff line number Diff line change @@ -231,6 +231,8 @@ fn run_host_tests(test_opt: &TestOpt) -> Result<()> {
231
231
232
232
/// Formats the project: nix, rust, and yml.
233
233
fn run_fmt_project ( fmt_opt : & FmtOpt ) -> Result < ( ) > {
234
+ let mut any_errors = false ;
235
+
234
236
// fmt rust
235
237
{
236
238
eprintln ! ( "Formatting: rust" ) ;
@@ -255,6 +257,7 @@ fn run_fmt_project(fmt_opt: &FmtOpt) -> Result<()> {
255
257
} else {
256
258
eprintln ! ( "❌ rust formatter failed: {e:#?}" ) ;
257
259
}
260
+ any_errors = true ;
258
261
}
259
262
}
260
263
}
@@ -279,6 +282,7 @@ fn run_fmt_project(fmt_opt: &FmtOpt) -> Result<()> {
279
282
} else {
280
283
eprintln ! ( "❌ yml formatter failed: {e:#?}" ) ;
281
284
}
285
+ any_errors = true ;
282
286
}
283
287
}
284
288
} else {
@@ -305,12 +309,17 @@ fn run_fmt_project(fmt_opt: &FmtOpt) -> Result<()> {
305
309
} else {
306
310
eprintln ! ( "❌ nix formatter failed: {e:#?}" ) ;
307
311
}
312
+ any_errors = true ;
308
313
}
309
314
}
310
315
} else {
311
316
eprintln ! ( "Formatting: nix - SKIPPED" ) ;
312
317
}
313
318
319
+ if any_errors {
320
+ bail ! ( "one or more formatting errors" ) ;
321
+ }
322
+
314
323
Ok ( ( ) )
315
324
}
316
325
Original file line number Diff line number Diff line change @@ -102,10 +102,13 @@ impl OvmfPaths {
102
102
) ;
103
103
}
104
104
} else {
105
- let prebuilt = Prebuilt :: fetch ( Source {
106
- tag : OVMF_PREBUILT_TAG ,
107
- sha256 : OVMF_PREBUILT_HASH ,
108
- } , OVMF_PREBUILT_DIR ) ?;
105
+ let prebuilt = Prebuilt :: fetch (
106
+ Source {
107
+ tag : OVMF_PREBUILT_TAG ,
108
+ sha256 : OVMF_PREBUILT_HASH ,
109
+ } ,
110
+ OVMF_PREBUILT_DIR ,
111
+ ) ?;
109
112
110
113
Ok ( prebuilt. get_file ( arch. into ( ) , file_type) )
111
114
}
You can’t perform that action at this time.
0 commit comments