File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ log = { version = "0.4.11", default-features = false }
17
17
rlibc = " 1.0.0"
18
18
qemu-exit = " 2.0.0"
19
19
20
+ [target .'cfg(any(target_arch = "x86", target_arch = "x86_64"))' .dependencies ]
21
+ runs_inside_qemu = " 1.0.2"
22
+
20
23
[features ]
21
24
# This feature should only be enabled in our CI, it disables some tests
22
25
# which currently fail in that environment (see #103 for discussion).
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ use uefi::prelude::*;
17
17
use uefi:: proto:: console:: serial:: Serial ;
18
18
use uefi:: table:: boot:: MemoryDescriptor ;
19
19
20
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
21
+ use runs_inside_qemu:: runs_inside_qemu;
22
+
20
23
mod boot;
21
24
mod proto;
22
25
mod runtime;
@@ -31,6 +34,12 @@ fn efi_main(image: Handle, mut st: SystemTable<Boot>) -> Status {
31
34
// output firmware-vendor (CStr16 to Rust string)
32
35
let mut buf = String :: new ( ) ;
33
36
st. firmware_vendor ( ) . as_str_in_buf ( & mut buf) . unwrap ( ) ;
37
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
38
+ {
39
+ if runs_inside_qemu ( ) {
40
+ assert_eq ! ( "EDK II" , buf. as_str( ) ) ;
41
+ }
42
+ }
34
43
info ! ( "Firmware Vendor: {}" , buf. as_str( ) ) ;
35
44
36
45
// Reset the console before running all the other tests.
You can’t perform that action at this time.
0 commit comments