Atest: Create a cache file for locate.

"updatedb" is not available on Darwin platform. Without it, Atest will
not be able to utilise locate command to speed up finding files.

This CL provides a rewritten "updatedb" script for Darwin to create a
database readable for "locate" command, which can read the database
without traversing the filesystem over and over again.

The purpose of it is to copy it to HOST_OUT and rename it "updatedb" in
Darwin, and invoke tools/atest_updatedb.py in both Linux and Darwin.

Bug: 132217764

Test: $ source build/envsetup.sh; lunch
      $ cd tools/tradefederation/core/atest/tools
      $ ./updatedb_darwin.sh -h # helping message
      # generate a database in $ANDROID_HOST_OUT/locate.database
      $ ./atest_updatedb.py

      # speed comparison:
      $ time find $ANDROID_BUILD_TOP -name gtest.cc
         (0m7.880s)
      $ time locate -d $ANDROID_HOST_OUT/locate.database gtest.cc
         (0m0.645s)

Change-Id: I0afbc23448d37d90cc8ac128db60fe179fe70f6c
5 files changed
tree: a7a157adcbc50b0323db3c6a3747f690513055a3
  1. atest/
  2. clearcut_client/
  3. common_util/
  4. proto/
  5. python-lib/
  6. remote/
  7. res/
  8. src/
  9. tests/
  10. util-apps/
  11. .classpath
  12. .gitignore
  13. .project
  14. Android.bp
  15. Android.mk
  16. atest_tradefed.sh
  17. CleanSpec.mk
  18. error_prone_rules.mk
  19. MANIFEST.mf
  20. OWNERS
  21. PREUPLOAD.cfg
  22. pylintrc
  23. README.md
  24. run_tf_cmd.sh
  25. script_help.sh
  26. TEST_MAPPING
  27. TEST_MAPPING_README
  28. tradefed.sh
  29. tradefed_win.bat
  30. verify.sh
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