The post_build_ninja_summary.py script, which autoninja automatically
runs if NINJA_SUMMARIZE_BUILD=1 is set, summarizes build time by file
extension. This is a good default summary but it can be handy to create
additional output categories. This change allows using fn_match style
wildcards to create additional categories which will then be summarized.
For instance:
python post_build_ninja_summary.py -C out/Def -s prec*.obj;blink*.obj
In addition the chromium_step_types environment variable can be set so
that when autoninja runs this script there will be additional summary
categories.
This has been used most recently when measuring the cost of creating and
using blink precompiled header files.
Bug: 1061326
Change-Id: I080b4ddd06d045a2351220e202cd9eec111bf00e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2093145
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This reverts commit 9f29465e52.
Reason for revert:
line 2302, in CMDUploadChange
change_id = change_ids[0]
IndexError: list index out of range
Original change's description:
> git-cl: Refactor CMDUploadChange
>
> Changes:
> - Add _GetDescriptionForUpload and _GetTitleForUpload.
> - Add ensure_change_id to ChangeDescription, that ensures the
> description has a particular Change-Id.
> - If more than a Change-Id was entered on new issue upload, remove
> all, and add a new one.
>
> Change-Id: I0eae474eb07ea3036973b18571f72a80da425b21
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101811
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: Ibb76539066c103ec951fa8d02684bc10f84549bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2103531
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Changes:
- Add _GetDescriptionForUpload and _GetTitleForUpload.
- Add ensure_change_id to ChangeDescription, that ensures the
description has a particular Change-Id.
- If more than a Change-Id was entered on new issue upload, remove
all, and add a new one.
Change-Id: I0eae474eb07ea3036973b18571f72a80da425b21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101811
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
If the Change-Id in the description is different from the one fetched
from Gerrit, automatically set the right one instead of asking the
user to do so.
Change-Id: I0f681d9e7d98f3ed50adc4b6e4929981530e901c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2101368
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Interrupt tests after 3 min, so that failures can be
surfaced before the presubmit step gets interrupted
on the bot.
Change-Id: Ia0efebaac5a0c5072b974a4fbbcb14fe672017ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2098942
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Implicitly concatenated strings are not supported when setting new
revisions, so raise an error when attempting to do se.
Bug: 1060772
Change-Id: I74d39b9eb8dcc420e9b7787c90bee642beb783cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2099407
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
gclient executes `git rev-parse <ref>` to check if <ref>
already exists in the local clone, which succeeds when
<ref> is a git revision hash, even if it doesn't exist.
We execute `git rev-parse <ref>^{commit}` instead, which only
succeeds when <ref> resolves to a valid commit in the local
repo.
Change-Id: Ia1cdf7162c4c82a7e4214c6af375c1a9522d7b07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2095745
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
When running `git rev-parse REV^{commit}` in Windows, `^` must be
escaped.
However, it was escaped more times than necessary.
Split IsValidRevision to call ResolveCommit, add tests to ResolveCommit,
and run scm.py tests on Windows.
Change-Id: I761a820394c8b5410d68b6ccd6c352c41c30c88c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2092904
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
stdout and stderr are bytes in Python 3 and must be decoded before
printing the exception.
Bug: 1060409
Change-Id: Ib855f6104919734b7505aa5e978ebe394a1e9db6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2097595
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
BUG=chromium:1060257
TEST=./recipes.py test run
Change-Id: Ie081430ff5f83964a53401099ce3c9bee682c7fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2097040
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: David Burger <dburger@chromium.org>
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: George Engelbrecht <engeg@google.com>
CQ added support to project-scoped accounts instead of previously
hardcoded commit-bot@ for working with Gerrit.
R=ehmaldonado
Test: `git cl status` on this very CL :)
Bug: 911811
Change-Id: I8f48a7bdc9dad9a5b71d266ccf7e9a493aa94aa9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2095986
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Also refactor code to eliminate multiple calls to _create_description_from_log.
Change-Id: I113134fbd90f396bdb6d561ed0369ea5ee9c78ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2090448
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
When user.email is not configured in git, git-cl tries to call
presubmit support with --author None, which makes git-cl crash.
Bug: b/150870673
Change-Id: Idc42ba2b970340ed93e1e92f65850fc1a12336d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2090375
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
When no -v flag is given, the verbosity defaults to None instead of 0,
so set 0 as a default.
Bug: 1058315
Change-Id: Id69e62550b33cd18bb1e5aed9cdc3c94f1488516
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2088193
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit 684096347b.
Reason for revert:
Breaks git-cl split.
https://bugs.chromium.org/p/chromium/issues/detail?id=1054888
Original change's description:
> Improve git cl split
>
> This CL changes the behavior of `git cl split` to split the change
> by the size of the resulting CLs. For now, this is based on the number
> of bytes changed, and not by the number of changed lines. Depending
> on the shape of change, this may still produce more CLs than expected
> (and possibly more than before).
>
> A future change will switch the split to be based on the number
> of affected lines, and also introduce a mode to base the split
> on the number of affected files.
>
> Bug: 998922
> Change-Id: I49f868972a61b89b426ef9e2ceedc733eacb4350
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778744
> Commit-Queue: Yannic Bonenberger <yannic.bonenberger@gmail.com>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
TBR=fdoray@chromium.org,dpranke@chromium.org,yannic.bonenberger@gmail.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com
Bug: 998922
Change-Id: I466e1245d5f1c934443d850c48c42d3e694e71c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2080205
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>