Accept both old (without path) and new (with) outputs in getActiveApexes

We can't assume that platform will support -f flag for the
pm list packages --apex-only command, which was added in R.
This change makes sure that getActiveApexes also works on older
version of platform by falling back to the previous pattern (without
path) and setting sourceDir field to empty string.

Test: cd tests; mma; ./run_tradefed_tests.sh
Bug: 140813980
Bug: 142953457
Change-Id: Ifc3ebbe4a4c2fb68d29d76381d42763b9ebdc2e5
2 files changed
tree: ebd99ec203f4fb8ff7dc09494d157ee3287e4841
  1. atest/
  2. clearcut_client/
  3. common_util/
  4. device_build_interfaces/
  5. global_configuration/
  6. invocation_interfaces/
  7. proto/
  8. python-lib/
  9. remote/
  10. res/
  11. src/
  12. test_framework/
  13. test_result_interfaces/
  14. tests/
  15. util-apps/
  16. .classpath
  17. .gitignore
  18. .project
  19. Android.bp
  20. Android.mk
  21. atest_tradefed.sh
  22. CleanSpec.mk
  23. error_prone_rules.mk
  24. MANIFEST.mf
  25. OWNERS
  26. PREUPLOAD.cfg
  27. pylintrc
  28. README.md
  29. run_tf_cmd.sh
  30. script_help.sh
  31. TEST_MAPPING
  32. tradefed.sh
  33. 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

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.