Reland "Support for V2 symupload in Symupload recipe module"

This is a reland of af02d8489fa5e46eb44890ae98b9b437373f2902.

Unit tests have been added and made edits to the symupload script
as it wasn't in a good state.

Original change's description:
> Support for V2 symupload in Symupload recipe module
>
> Symupload V2 protocol is invoked by passing in additional arguments
> (-p for win, -p sym-upload-v2 for linux/mac) alongside an api_key.
> Updating the symupload recipe module to accept a path to the api_key
> that's read and passed to the symupload command if provided. Passing
> the api_key will default usage to V2 protocol. Otherwise, default
> to V1 behavior.
>
> Platform checks are changed from target_platform to host_platform.
> Sanity checks for the api key are done by length, like the
> official_symbols.py script referenced in comment.
>
> Bug: 912681
> Change-Id: I97f291144095e01d393b0c40403fcf7b35a6970d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2569925
> Commit-Queue: Jeff Yoon <jeffyoon@google.com>
> Reviewed-by: Michael Moss <mmoss@chromium.org>

Bug: 912681
Change-Id: I394b3d32054cca2923f5c7e627420d76774f5029
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2579700
Commit-Queue: Jeff Yoon <jeffyoon@google.com>
Reviewed-by: Michael Moss <mmoss@chromium.org>
8 files changed
tree: 9c6654d8f97bf096ef196799b4015bbfcefadbb9
  1. infra/
  2. recipes/
  3. scripts/
  4. site_config/
  5. third_party/
  6. .gitattributes
  7. .gitignore
  8. .style.yapf
  9. .vpython
  10. .yapfignore
  11. codereview.settings
  12. CROS_OWNERS
  13. DEPS
  14. environment.cfg.py
  15. LICENSE
  16. OWNERS
  17. PRESUBMIT.py
  18. README.md
  19. WATCHLISTS
README.md

Recipes

If you're here to make a change to ‘recipes’ (the code located in scripts/slave/recipes*), please take a look at the README for more information pertaining to recipes.

Style

The preferred style is PEP8 with two-space indent; that is, the Chromium Python style. Functions use lowercase_with_underscores, with the exception of the special functions RunSteps and RunTests in recipes. Use yapf (git cl format --no-clang-format) to autoformat new code.