Add os parameter to composd_cmd

This will be used by AVFHostTestCases and ComposTestCases to test
various microdroid OSes.

Bug: 302465542
Test: composd_cmd
Change-Id: I85b86fa66f0c79b633eb359873b94edcff79d561
diff --git a/android/composd_cmd/composd_cmd.rs b/android/composd_cmd/composd_cmd.rs
index 6d096a1..6281bd0 100644
--- a/android/composd_cmd/composd_cmd.rs
+++ b/android/composd_cmd/composd_cmd.rs
@@ -46,6 +46,10 @@
         /// If any APEX is staged, prefer the staged version.
         #[clap(long)]
         prefer_staged: bool,
+
+        /// OS for the VM.
+        #[clap(long, default_value = "microdroid")]
+        os: String,
     },
 }
 
@@ -56,7 +60,7 @@
 
     match action {
         Actions::StagedApexCompile {} => run_staged_apex_compile()?,
-        Actions::TestCompile { prefer_staged } => run_test_compile(prefer_staged)?,
+        Actions::TestCompile { prefer_staged, os } => run_test_compile(prefer_staged, &os)?,
     }
 
     println!("All Ok!");
@@ -116,9 +120,9 @@
     run_async_compilation(|service, callback| service.startStagedApexCompile(callback))
 }
 
-fn run_test_compile(prefer_staged: bool) -> Result<()> {
+fn run_test_compile(prefer_staged: bool, os: &str) -> Result<()> {
     let apex_source = if prefer_staged { ApexSource::PreferStaged } else { ApexSource::NoStaged };
-    run_async_compilation(|service, callback| service.startTestCompile(apex_source, callback))
+    run_async_compilation(|service, callback| service.startTestCompile(apex_source, callback, os))
 }
 
 fn run_async_compilation<F>(start_compile_fn: F) -> Result<()>