commit | cbdf9440007d17d1f3064e04ea9daee4abdb327e | [log] [tgz] |
---|---|---|
author | Frederick Mayle <fmayle@google.com> | Thu May 30 15:56:29 2024 -0700 |
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Mon Jun 10 19:06:17 2024 +0000 |
tree | 693dca732a9a8047a22d7ed61f9efa5f0bf607df | |
parent | 810fa180e67804c67ade61e473b64ff2fddbe324 [diff] |
DeviceSnapshotHandler: always throw exception for error responses Error repsonses that can be deserialized are probably just string error messages, so turn them into an exception and throw them. This simplifies the callers and makes it easier to find the underlying error in test failures. The typical failure path was to throw an exception even before, so the intricate code in callers to throw a new exception in a particular way seems like a mistake (e.g. not all snapshot failures use DeviceErrorIdentifier.DEVICE_FAILED_TO_SNAPSHOT). If any of that is important, we should move it into DeviceSnapshotHandler. Bug: 341991139 Test: m tradefed tradefed-tests && tools/tradefederation/core/tradefed.sh run singleCommand host --console-result-reporter:suppress-passed-tests --class com.android.tradefed.device.internal.DeviceSnapshotFeatureTest Change-Id: Ic8b2cc6e126fa3afa1758b185649a7d9942285ee
TF is a test harness used to drive Android automated testing. It runs on test hosts and monitors the connected devices, handling test scheduling & execution and device management.
Other test harnesses like Compatibility Test Suite (CTS) and Vendor Test Suite (VTS) use TF as a basis and extend it for their particular needs.
1. Create your change in Gerrit 2. Add the reviewer named "Tradefed Codereview" (email: tradefed-codereview@tradefederation.google.com.iam.gserviceaccount.com) 3. Review the code review guidance at go/tf-guidelines and go/tradefed-code-reviews 4. GWSQ should add a couple of people from the team to review your code and give feedback.
More information at: https://source.android.com/docs/core/tests/tradefed/
See more details about Tradefed Architecture at: https://source.android.com/docs/core/tests/tradefed/architecture
If you are a tests writer you should start looking in the test_framework/ component which contains everything needed to write a tests in Tradefed.