push `FindChromeOSRootAbove` out of hash-getting

Most scripts have a clear idea of what the CrOS root directory is. Pass
that in here, rather than taking anything in a CrOS tree, so this is
easier to think about.

I hand-audited the handful of calls to this function. Most were already
doing this.

BUG=None
TEST=Unittests

Change-Id: Id0dd6c13bf3c78c828594fefd6a5f523f9553333
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/5533680
Commit-Queue: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
4 files changed
tree: dd19b184f98ecbf9a392c118e05a1d4359c40a6e
  1. afdo_metadata/
  2. afdo_redaction/
  3. afdo_tools/
  4. compiler_wrapper/
  5. contrib/
  6. cros_utils/
  7. cwp/
  8. llvm_extra/
  9. llvm_tools/
  10. pgo_tools/
  11. pgo_tools_rust/
  12. py/
  13. rust-analyzer-chromiumos-wrapper/
  14. rust_tools/
  15. seccomp_tools/
  16. toolchain_utils_githooks/
  17. upstream_workon/
  18. .gitignore
  19. android_merge_from_upstream.sh
  20. auto_abandon_cls.py
  21. check_portable_toolchains.py
  22. compiler-test.sh
  23. crate_ebuild_help.py
  24. DIR_METADATA
  25. LICENSE
  26. OWNERS
  27. OWNERS.toolchain
  28. PRESUBMIT.cfg
  29. pyrun
  30. python_wrapper.py
  31. README.chromium
  32. README.md
  33. run_python_tests.sh
  34. run_tests_for.py
README.md

toolchain-utils

Various utilities used by the ChromeOS toolchain team.

Note

To run Python scripts in this directory, first run:

export PYTHONPATH=$(readlink -f .):$PYTHONPATH

from this directory.

Then you can run any script.

To get help on any script, type in python <script> --help, or refer to the header of the script for more information.