When upload presubmits are being run then GetUnitTests would treat
errors as warnings, so as to not stop developers from uploading their
changes. This makes sense when patches are being manually uploaded, but
doesn't make sense when running a "git cl presubmit --all --upload" bot.
This behavior caused nine failures (but not all failures) to be missed
when doing these tests.
This change makes these failures errors when testing with --all
--upload, but leaves them as warnings for other --upload purposes.
Bug: 1309977
Change-Id: Ibf149475e4cdee10bbbbc86fd0ab668b7a679089
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3788227
Reviewed-by: Jesse McKenna <jessemckenna@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
We want people to use specific pylint-$VER wrappers now to get stable
behavior and make it easier to roll updates. This one is just a link
to pylint-1.5 which uses Python 2. Anyone still linting Python 2 code
should be using pylint-1.5 explicitly.
Let's drop this to get it out of $PATH for developers who want pylint
from their host system to "just work".
Change-Id: I14411db7cddd0ecce40a370366c21f496166fe1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3780302
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
Although many things are private, the existence of Chrome is not.
This change has precedent, c.f. 04d16a561 for infra_internal.
Bug: None
Change-Id: I6fb9719a44c2e5f5cc492bacb442d9554b0d4480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3779641
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Thiago Perrotta <tperrotta@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
When investigating presubmits it is sometimes handy to get stacks in
order to understand where a presubmit is being called from. In one
recent investigation to see why CheckOwners was being called multiple
times the traceback just said:
File "c:\src\depot_tools\presubmit_support.py", line 1646, in _run_check_function
result = eval(function_name + '(*__args)', context)
File "<string>", line 1, in <module>
File "PRESUBMIT.py", line 251, in CheckChangeOnUpload
That's not very helpful because Chromium has 288 files named
PRESUBMIT.py. This change just uses the actual presubmit path as the
filename parameter to compile instead of a hard-coded string, which
means that "PRESUBMIT.py" is replaced with the full path in the
tracebacks.
Bug: 1309977
Change-Id: Icacfae4399444cb24e9cfb07475b90099e2e18d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3776955
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Currently, `git cl help baseurl` fails as it tries to execute the
subcommand, completely bypassing the help.
Parse the arguments early so that the help command runs cleanly for
baseurl.
Fixed: 1345909
Change-Id: Icad7aca6cdc7c9938e91a421cb72e08433a30fd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3776942
Auto-Submit: Thiago Perrotta <tperrotta@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
- Instead of expecting the caller to run `rev-parse HEAD` before
calling gclient, we can just store the latest commit on disk
- this gets around the problem where gclient might git reset to the
base checkout after applying patch-refs, so calling rev-parse
before calling gclient sync might not actually return the latest
commit of the last sync.
- also moving os.environ[PREVIOUS_CUSTOM_VARS] setting to earlier when
we only have the solutions in self.dependencies because all other
dependencies inherit from the solutions so there's no point storing
custom_vars for the rest.
Bug: 1339472
Change-Id: I6a3570f09153bd8087bbe6bdab7ece4949856aae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3750491
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
- The extra comma at the end of the url string unintentionally turns
the url into a list.
- The project name should be "pdfium".
Change-Id: I8944d59d06751716c512030145d29aac10cf13fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3770290
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
This release contains commits:
e74f8f68337ee619d400e0b6607cbe9df37f78ee Fix so that Python inherits file handles again on Windows.
059bcab0fb866cf8b9bc25b5845beeb8ee90fe3d Bundle the python interpreter on Mac.
e2552b1a6ebed6651aceb5a7ab4639c0d69c0c0e Resolve symlinks when finding the vpython executable.
d5fc7bca58e458258f8c3b8a25ecd070c77581ac Roll infra/go/src/go.chromium.org/luci/ ee2c632ce..82d549a81 (1 commit)
5d9b6ecf87cdfb928e1112d2838d26bc7ede2b48 Roll infra/go/src/go.chromium.org/luci/ 0480658b5..0535bf685 (5 commits)
3076679301d2b9b040bce2c871a63ddc49273c41 [environ] Rename Get => Lookup, GetEmpty => Get.
37f02f9f91aa3918b195931fbcf02750290d0571 Search bundled python paths before looking in PATH.
a4136aa4d9e8c359bcf234fcd6ae026fb5b92925 [go] Format all files.
8349853d4517895a2c5838a00aea3e368ce3f865 [vpython] Make TestLoadForScript pass on OSX when running locally.
d94b5704d8ad151a0306974a1a949d8057c44a18 Revert "Add support for bootstrapping the Python interpreter package."
6dacee57fbe6b5bc5a2fca23b5b7d8ccfea54ee7 Revert "Pass packages to vpython to bootstrap."
03e0afedc841bad5fed8024c4b7fd38d332701ad Pass packages to vpython to bootstrap.
fa3d6effe8906e93944bf54ea6978adcd022f75c go generate all
b5eee61d0153295f3efb2e67b319066c2306ac5b Add support for bootstrapping the Python interpreter package.
cc5fb5e4934445a0a5206bfc324ca486c1285415 [vpython] Skip flaky test.
c04b64ca743703ebbfc064ec5b5c35d3bc378fa4 Add vpython3-only cipd packages.
f14d61370f1d7302a797feb2adc3a2f2449130d1 Remove the VENVOmitUseWheel field now that nothing uses it.
7c739ae11aa23bc37601e6923add677600ae1329 Remove support for old pip versions in pep425 tag probing.
51e3f0a01454d2e18b36de28c7e0ca2f6127ea2b Stop setting the unused VENVOmitUseWheel option.
e0e35a4e2227fb3429f3483c4719b6370eca7e1e Hardcode the venv OmitUseWheel option to true.
Bug: 1318617, 1340653
Change-Id: Ifb94c81492edfa98e1b59fc82e6d43678b82d776
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3756933
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
Allow someone interested in checking out a subset of the PDFium source
to do so via:
fetch pdfium --checkout_configuration=small
Along the way, also add support for the target_os and target_os_only
properties, which are carried over from the Chromium fetch config.
Change-Id: I11153fe7cb828c748055328ab2b60224b665ae84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3758798
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Some presubmits can be take orders of magnitude longer than others, but
finding these presubmits is difficult if the time is printed at the end
of the output lines. Moving the time to the start, with enough alignment
for all plausible times, makes scanning the output easy.
Bug: 1309977
Change-Id: I9ba1a599e9825801e1128844a39c7ccafe046f91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3744130
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This check has been failing for a while, and blocks submission of other
depot_tools CLs.
Change-Id: I0f61ff1657c8cc01d0004ed5df9e37465b73c237
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3759629
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Headers currently have the format: `** Presubmit ${name} **`. Make these
more helpful by including the number of total errors there are.
Bug: 1341987
Change-Id: Ib41a133c31568d4264d73c14350f0bbd9590356a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3756169
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
PRESUBMIT.py files should not have CRLF line endings, but if a git repo
is misconfigured this may happen and it is important for the presubmits
to run properly so that they can report on this issue.
In particular, the regex which detects USE_PYTHON3 = True did not work
with CRLF line endings.
It was supposed to handle these, and there is even a comment saying:
# Accept CRLF presubmit script.
However the line after that uses 'rU' as the file open mode in order to
try to get universal newlines, but FileRead ignores the file mode. So,
the replace method is now used instead.
Bug: angleproject:7475, angleproject:4905
Change-Id: I38321176feca089a5796b24756b371709d852243
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3739269
Reviewed-by: Eddie Hatfield <eddiehatfield@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This CL relaxes the check for the .git folder on Windows so that it
may be either a file or a folder, as may be the case if depot_tools
is a git submodule or a worktree.
Bug: 1333997
Change-Id: Ib805912903696fc247f85d15c35b6e3093cd57f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736684
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>