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.
12 lines
448 B
Python
12 lines
448 B
Python
# Copyright (c) 2026 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
"""Import this to add the parent tools/cr to sys.path."""
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
_cr = str(Path(__file__).parent.parent)
|
|
if _cr not in sys.path:
|
|
sys.path.insert(0, _cr)
|