3 Commits
Author SHA1 Message Date
cdesouza-chromium 1796f9c9a0 [brockit] Tooling path further restructure for relative paths (#36322)
This change does further restruturing to `tools/cr`, as now we are fully
reliant on paths being completely relative, and derived primarily from
`Repository.brave.root` as an anchor for all other relative paths.

With relative paths already landed, we can now further break down
`alias`, and make tests more reliable, by using `FakeChromiumSrc`
sandboxing for all tests. In particular, `tools/cr/commit.py` has also
been introduced, and now the hook destination path is fully relative to
`brave-core` root. This potentially fixes a recurring issue that in some
cases running tests for `install-hook` was uninstalling hooks in the
current `brave-core` checkout.

As an additional, `git cr` calls were not propagating the `cwd`
correctly, and this can now be corrected too.

This change also adds a README.md, to provide some overview of this
path, and some instructions that may be useful to be picked by AI agents
when writing tests.

For better guarantees, `vpython3_utils.py` now handles the file path
resolution to the vpython3 runtime across all applications in this path.

Finally, logging policy is now established with a default logger for
anything using `terminal.py`. This logger can be replaced by individual
applications, but it is of great benefit to be able to call anything
using `terminal.py` with `--verbose` at any moment.
2026-05-11 17:27:13 +01:00
cdesouza-chromium beb58398e9 [git-cr] Make commit its own module (#36317)
This change makes the code for `git-cr` tools more modular. This will
help with test correctness ultimately, as now we are depending fully on
`Repository` for paths, specially install paths, which eliminates a
recurring issue where tests do seem to interfere with the current
install path `brave-core`.
2026-05-11 13:12:29 +01:00
cdesouza-chromium d79eeeeded Moving git-cr code under alias/ (#36154)
This PR is pretty much just a rearranging of code, with no practical
function changes. Files have been renamed to be less repetitive and more
intuitive. There are few minor changes though:

1. `_boot.py` has been introduced to allow `alias/` sources to be able
   to include `tools/cr` into path and make themselves a submodule. This
   is not the best posssible solution, but it does avoid having to mess
   with PATH or PYTHONPATH and any other similar constant before calling
   these scripts.
2. `PRESUBMIT.py` has been updated to run tests in subdirectories.
2026-05-05 15:31:03 +01:00