Support payload path for vm run-app
Bug: 258323168
Test: atest MicrodroidTests MicrodroidHostTestCases
Test: manually run VM with --config-path and --payload-path
Change-Id: I137c8b8efc33b49cb22efaba0e5917dd469c2462
diff --git a/vm/src/main.rs b/vm/src/main.rs
index 3b887d3..89d56d4 100644
--- a/vm/src/main.rs
+++ b/vm/src/main.rs
@@ -48,8 +48,13 @@
instance: PathBuf,
/// Path to VM config JSON within APK (e.g. assets/vm_config.json)
+ #[clap(long)]
config_path: Option<String>,
+ /// Path to VM payload binary within APK (e.g. MicrodroidTestNativeLib.so)
+ #[clap(long)]
+ payload_path: Option<String>,
+
/// Name of VM
#[clap(long)]
name: Option<String>,
@@ -201,6 +206,7 @@
storage,
storage_size,
config_path,
+ payload_path,
daemonize,
console,
log,
@@ -219,7 +225,8 @@
&instance,
storage.as_deref(),
storage_size,
- config_path.as_deref().unwrap_or(""),
+ config_path,
+ payload_path,
daemonize,
console.as_deref(),
log.as_deref(),