@@ -180,8 +180,11 @@ pub enum EngineLauncher {
180
180
/// The binary inside the engine distribution will be built as an optimized native image
181
181
Native ,
182
182
/// The binary inside the engine distribution will be built as native image with assertions
183
+ /// enabled but no debug information
184
+ TestNative ,
185
+ /// The binary inside the engine distribution will be built as native image with assertions
183
186
/// enabled and debug information
184
- DebugNative ,
187
+ TestDebugNative ,
185
188
/// The binary inside the engine distribution will be a shell script
186
189
#[ default]
187
190
Shell ,
@@ -191,11 +194,20 @@ impl FromStr for EngineLauncher {
191
194
type Err = anyhow:: Error ;
192
195
193
196
fn from_str ( s : & str ) -> Result < Self > {
194
- match s {
195
- "native" => Ok ( Self :: Native ) ,
196
- "debugnative" => Ok ( Self :: DebugNative ) ,
197
- "shell" => Ok ( Self :: Shell ) ,
198
- _ => bail ! ( "Invalid Engine Launcher type: {}" , s) ,
197
+ if s == "shell" {
198
+ Ok ( Self :: Shell )
199
+ } else if s. contains ( "native" ) {
200
+ if s. contains ( "test" ) {
201
+ if s. contains ( "debug" ) {
202
+ Ok ( Self :: TestDebugNative )
203
+ } else {
204
+ Ok ( Self :: TestNative )
205
+ }
206
+ } else {
207
+ Ok ( Self :: Native )
208
+ }
209
+ } else {
210
+ bail ! ( "Invalid Engine Launcher type: {}" , s)
199
211
}
200
212
}
201
213
}
@@ -204,7 +216,8 @@ impl From<EngineLauncher> for String {
204
216
fn from ( value : EngineLauncher ) -> Self {
205
217
match value {
206
218
EngineLauncher :: Native => "native" . to_string ( ) ,
207
- EngineLauncher :: DebugNative => "debugnative" . to_string ( ) ,
219
+ EngineLauncher :: TestNative => "testnative" . to_string ( ) ,
220
+ EngineLauncher :: TestDebugNative => "testdebugnative" . to_string ( ) ,
208
221
EngineLauncher :: Shell => "shell" . to_string ( ) ,
209
222
}
210
223
}
@@ -214,7 +227,8 @@ impl Display for EngineLauncher {
214
227
fn fmt ( & self , f : & mut Formatter ) -> std:: fmt:: Result {
215
228
match * self {
216
229
EngineLauncher :: Native => write ! ( f, "native" ) ,
217
- EngineLauncher :: DebugNative => write ! ( f, "debugnative" ) ,
230
+ EngineLauncher :: TestNative => write ! ( f, "testnative" ) ,
231
+ EngineLauncher :: TestDebugNative => write ! ( f, "testdebugnative" ) ,
218
232
EngineLauncher :: Shell => write ! ( f, "shell" ) ,
219
233
}
220
234
}
0 commit comments