2
2
// Copyright © 2019 Intel Corporation
3
3
4
4
#![ feature( asm_const) ]
5
- #![ feature( alloc_error_handler) ]
6
5
#![ feature( slice_take) ]
7
6
#![ feature( stdsimd) ]
8
7
#![ feature( stmt_expr_attributes) ]
9
8
#![ cfg_attr( not( test) , no_std) ]
10
9
#![ cfg_attr( not( test) , no_main) ]
10
+ #![ cfg_attr(
11
+ all( not( test) , not( feature = "integration_tests" ) ) ,
12
+ feature( alloc_error_handler)
13
+ ) ]
11
14
#![ cfg_attr( test, allow( unused_imports, dead_code) ) ]
12
15
#![ cfg_attr( not( feature = "log-serial" ) , allow( unused_variables, unused_imports) ) ]
13
16
17
+ #[ cfg( all( not( test) , not( feature = "integration_tests" ) ) ) ]
14
18
use core:: panic:: PanicInfo ;
15
19
16
- #[ cfg( target_arch = "x86_64" ) ]
20
+ #[ cfg( all(
21
+ not( test) ,
22
+ not( feature = "integration_tests" ) ,
23
+ target_arch = "x86_64" ,
24
+ feature = "log-panic"
25
+ ) ) ]
17
26
use x86_64:: instructions:: hlt;
18
27
19
28
#[ cfg( target_arch = "aarch64" ) ]
@@ -60,7 +69,7 @@ mod uart_mmio;
60
69
mod uart_pl011;
61
70
mod virtio;
62
71
63
- #[ cfg( all( not( test) , feature = "log-panic" ) ) ]
72
+ #[ cfg( all( not( test) , not ( feature = "integration_tests" ) , feature = "log-panic" ) ) ]
64
73
#[ panic_handler]
65
74
fn panic ( info : & PanicInfo ) -> ! {
66
75
log ! ( "PANIC: {}" , info) ;
@@ -70,7 +79,11 @@ fn panic(info: &PanicInfo) -> ! {
70
79
}
71
80
}
72
81
73
- #[ cfg( all( not( test) , not( feature = "log-panic" ) ) ) ]
82
+ #[ cfg( all(
83
+ not( test) ,
84
+ not( feature = "integration_tests" ) ,
85
+ not( feature = "log-panic" )
86
+ ) ) ]
74
87
#[ panic_handler]
75
88
fn panic ( _: & PanicInfo ) -> ! {
76
89
loop { }
0 commit comments