Add SDV 1-VM and 2-VM presubmit E2E tests - #3153
SuperStrongDinosaur wants to merge 1 commit into
Conversation
ab016d7 to
f06083f
Compare
8ff79cf to
e2157fa
Compare
cd2fa8a to
5bb066b
Compare
|
Instead of treating SDV CF as an outlier, a better approach is to generalize the new test cases so they can optionally support non-SDV CF variants. So I recommend the following changes:
@Databean please let me know your thoughts. |
Databean
left a comment
There was a problem hiding this comment.
a better approach is to generalize the new test cases so they can optionally support non-SDV CF variants.
Most of the tests do look pretty general, except for the GetSyspropStringForDevice parts.
5bb066b to
99234db
Compare
Thanks for the feedback @chihchiachen. Generalizing the lifecycle and multi-instance isolation tests across other CF targets is definitely a right long-term direction. In this PR, my goal is to have the foundational presubmit coverage required specifically for SDV targets without affecting existing CI pipelines Now that the CVD lifecycle methods are decoupled into free functions under e2etests/cvd/common/cvd.go, we can build a generalized lifecycle_test and isolation_test in a dedicated follow-up PR once we define common identity checks for standard CF |
99234db to
1a324b2
Compare
a3c31b3 to
af687c9
Compare
af687c9 to
c4c8b48
Compare
c4c8b48 to
2894b90
Compare
Integrate Software Defined Vehicle (SDV) test coverage into
android-cuttlefish presubmit, validating lifecycle operations
and multi-instance isolation based on Android platform testing:
- Single-VM lifecycle operations (status, stop, start, restart).
- Two-VM environment creation and secondary instance lifecycle
with primary instance isolation checks.
Summary of changes:
- Add //cvd/sdv_tests:sdv_tests Go E2E test target under e2etests/cvd.
- Implement 1-VM SDV test covering image fetch, boot, status check,
stop/start lifecycle, and restart lifecycle with sysprop validation.
- Implement 2-VM SDV test (SDV Core ins-1 on 127.0.0.1:6520 and SDV Media
ins-2 on 127.0.0.1:6521) covering multi-VM creation via load config,
status verification, and ins-2 stop/start and restart lifecycle with
ins-1 isolation checks.
- Exclude sdv_tests from containerized kokoro_podcvd via podcvd_excluded tag.
- Add common CVD helpers in e2etests/cvd/common/cvd.go:
- TestContext receiver methods and free functions:
CVDStop, CVDStart, CVDRestart, CVDStatus
CVDInstanceStop, CVDInstanceStart, CVDInstanceRestart, CVDInstanceStatus
- Robust ParseCVDStatusJSON handling array, group object, and single object formats
without vulnerability to log prefixes
- Add unit tests for ParseCVDStatusJSON in e2etests/cvd/common/cvd_test.go
- Add common test helpers in e2etests/cvd/common/common.go:
- Early adb server startup in SetUp
- RunAdbWaitForDeviceSerial for targeted device adb transport synchronization
- WaitForDeviceOffline using Go context timeout and standard adb wait-for-disconnect
- GetSyspropStringForDevice for explicit serial-targeted sysprop reads
Test:
- bazel test //cvd/common:common_test
- bazel build //cvd/...
- bazel test //cvd/sdv_tests:sdv_tests (in Kokoro presubmit environment)
BUG=507906785
TAG=agy
CONV=e15765ae-4a0e-4b45-a7f2-07dad2ac1459
2894b90 to
5836488
Compare
This PR introduces end-to-end presubmit test coverage for SDV targets under
e2etests/cvd/sdv_tests.The test suite validates SDV device lifecycle operations (status querying, graceful stop, start, and restart) and multi-VM isolation based on the device-host interaction baseline tests:
- Single-VM lifecycle operations (
sdv_fw_baseline_dhi_1vm_test.py)- Two-VM multi-instance lifecycle and isolation (
sdv_fw_baseline_dhi_2vm_test.py)BUG: b/559633154