[go: nahoru, domu]

fix various DEVICE_SNAPSHOT_* metric double logging

Some of DEVICE_SNAPSHOT_* metrics were logged both in AdbSshConnection
and in DeviceSnapshotHandler. Note that actual measurement of durations
is done in DeviceSnapshotFeature.snapshot, then passed along as part of
the text response and, finally, DeviceSnapshotHandler parses that time
and logs it. So, for better or worse, the measurements will still not
include any DeviceSnapshotHandler->DeviceSnapshotFeature RPC overhead.

Bug: 347772045
Test: m tradefed tradefed-tests && tools/tradefederation/core/tradefed.sh run singleCommand host --console-result-reporter:suppress-passed-tests --class com.android.tradefed.device.connection.AdbSshConnectionTest
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
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.DeviceSnapshotHandlerTest
Change-Id: I4f5bf44215e1f0fba8e3d55c7ec9c004248a6c8f
2 files changed
tree: 3220cd93a96d141867ddd0b684c12d9c33fa4c14
  1. aoa_helper/
  2. atest_proto/
  3. clearcut_client/
  4. common_util/
  5. device_build_interfaces/
  6. external_dependencies/
  7. global_configuration/
  8. invocation_interfaces/
  9. isolation/
  10. javatests/
  11. lite/
  12. proto/
  13. reference_tests/
  14. remote/
  15. res/
  16. src/
  17. test_framework/
  18. test_observatory/
  19. test_result_interfaces/
  20. tools/
  21. util_apps/
  22. .classpath
  23. .gitignore
  24. .project
  25. Android.bp
  26. Android.mk
  27. aosp_sha.sh
  28. atest_tradefed.sh
  29. CleanSpec.mk
  30. error_prone_rules.mk
  31. MANIFEST.mf
  32. MULTIUSER_OWNERS
  33. OWNERS
  34. PREUPLOAD.cfg
  35. pylintrc
  36. README.md
  37. run_tf_cmd.sh
  38. script_help.sh
  39. TEST_MAPPING
  40. tradefed.sh
  41. tradefed_win.bat
README.md

Trade Federation (TF / Tradefed)

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.

Building TF:

  • source build/envsetup.sh
  • tapas tradefed-all
  • make -j8

Getting Code Reviewed

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

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.