@@ -33,6 +33,10 @@ pub struct Config {
33
33
/// An exit code that should be considered as success for test executables (applies to
34
34
/// `bootimage runner`)
35
35
pub test_success_exit_code : Option < i32 > ,
36
+ /// Whether the `-no-reboot` flag should be passed to test executables
37
+ ///
38
+ /// Defaults to `true`
39
+ pub test_no_reboot : bool ,
36
40
}
37
41
38
42
/// Reads the configuration from a `package.metadata.bootimage` in the given Cargo.toml.
@@ -91,6 +95,9 @@ fn read_config_inner(manifest_path: &Path) -> Result<Config> {
91
95
( "test-args" , Value :: Array ( array) ) => {
92
96
config. test_args = Some ( parse_string_array ( array, "test-args" ) ?) ;
93
97
}
98
+ ( "test-no-reboot" , Value :: Boolean ( no_reboot) ) => {
99
+ config. test_no_reboot = Some ( no_reboot) ;
100
+ }
94
101
( key, value) => {
95
102
return Err ( anyhow ! (
96
103
"unexpected `package.metadata.bootimage` \
@@ -123,6 +130,7 @@ struct ConfigBuilder {
123
130
test_args : Option < Vec < String > > ,
124
131
test_timeout : Option < u32 > ,
125
132
test_success_exit_code : Option < i32 > ,
133
+ test_no_reboot : Option < bool > ,
126
134
}
127
135
128
136
impl Into < Config > for ConfigBuilder {
@@ -140,6 +148,7 @@ impl Into<Config> for ConfigBuilder {
140
148
test_args : self . test_args ,
141
149
test_timeout : self . test_timeout . unwrap_or ( 60 * 5 ) ,
142
150
test_success_exit_code : self . test_success_exit_code ,
151
+ test_no_reboot : self . test_no_reboot . unwrap_or ( true ) ,
143
152
}
144
153
}
145
154
}
0 commit comments