Improve error reporting in the ART run-test TradeFed test trunner.

The `com.android.tradefed.testtype.ArtRunTest` test runner used to
report any test error as soon as it was detected. To improve error
reporting (and make diagnosis easier), refactor the error checking
logic to first collect all errors and then report them (in a single
place) at the end of the test.

Test: m tradefed tradefed-tests \
        && tools/tradefederation/core/tests/run_tradefed_tests.sh \
             --class com.android.tradefed.testtype.ArtRunTestTest
Test: atest --test-mapping art:all
Bug: 171177621
Bug: 147812905
Change-Id: I611d077f2769f350ea6ba4630084620d0539ccc5
2 files changed
tree: 6e76d771f14707630be997c7d97c396c33b6d1d4
  1. clearcut_client/
  2. common_util/
  3. device_build_interfaces/
  4. global_configuration/
  5. invocation_interfaces/
  6. isolation/
  7. lite/
  8. proto/
  9. reference_tests/
  10. remote/
  11. res/
  12. src/
  13. test_framework/
  14. test_result_interfaces/
  15. tests/
  16. util-apps/
  17. .classpath
  18. .gitignore
  19. .project
  20. Android.bp
  21. Android.mk
  22. aosp_sha.sh
  23. atest_tradefed.sh
  24. CleanSpec.mk
  25. error_prone_rules.mk
  26. MANIFEST.mf
  27. OWNERS
  28. PREUPLOAD.cfg
  29. pylintrc
  30. README.md
  31. run_tf_cmd.sh
  32. script_help.sh
  33. TEST_MAPPING
  34. tradefed.sh
  35. 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/devices/tech/test_infra/tradefed/

See more details about Tradefed Architecture at: https://source.android.com/devices/tech/test_infra/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.