Use protected VM if possible
If the system is capable of running a protected VM, then request one.
On userdebug/eng builds only, fall back to unprotected VM if that is
all that is available. (This is useful for testing.)
A protected VM doesn't support full debug, so use app only debug in
that case. That change requires relaxing the constraint on running
compilation in test mode to match.
I've also increases the VM start timeout to avoid spurious timeouts.
Bug: 217687661
Test: composd_cmd staged-apex-compile
Test: composd_cmd test-compile
Change-Id: Ic7be2c5260982c3c69421c01d10c1537864b87be
diff --git a/compos/common/timeouts.rs b/compos/common/timeouts.rs
index 42cfe69..c86ae34 100644
--- a/compos/common/timeouts.rs
+++ b/compos/common/timeouts.rs
@@ -53,7 +53,7 @@
// Note: the source of truth for these odrefresh timeouts is art/odrefresh/odr_config.h.
odrefresh_max_execution_time: Duration::from_secs(300),
odrefresh_max_child_process_time: Duration::from_secs(90),
- vm_max_time_to_ready: Duration::from_secs(10),
+ vm_max_time_to_ready: Duration::from_secs(15),
};
/// The timeouts that we use when need_extra_time() returns true.