Header was printed using sys.stdout, but the rest of the output was
printed using sys.stdout.buffer, causing the output to be written
before the header.
Bug: 984182
Change-Id: If6aaa05a579c3b0c73ce8ffe48f3a4e777fa16fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1790254
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
While fetching monorail issues, @chromium.org is appended to the --user
option even if the original --user option is already a email address
(e.g. user@google.com).
Change-Id: I2442f4ea977b2681a72271f7c20fabb1ceaa351c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1790222
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Peter Lee <pkl@chromium.org>
The NINJA_SUMMARIZE_BUILD already triggers two types of build
performance data - setting NINJA_STATUS to give more details during the
build and running post_build_ninja_summary.py after the build.
One of the most common causes of slow builds is when CreateProcess
becomes slow, usually due to anti-virus overhead. Neither of these
reports make this problem easily visible, but ninja -d stats does. In
particular the StartEdge data is an excellent summary of CreateProcess
timing. If the StartEdge average (avg) is more than about 6,000 us
(6.0 ms) it might be worth investigating why.
Therefore this change makes it so that autoninja.py adds -d stats to the
command line when NINJA_SUMMARIZE_BUILD is set to 1.
Change-Id: I1b6b990708c784a2cd71d153713b422f090775e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1788399
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
423aa5860 [led] Set logdog prefix as led_run_id property
40c1ac5b5 [led] Set recipe input property for recipes source
d9cf01212 [led] When consolidating isolateds, skip empty isolate hashes.
838b3cb14 [led] Pull isolate consolidation out of GetSwarmingTask.
7a6c68c7a [led] Make edit-isolated orthogonal to edit-recipe-bundle.
8e8edcb4f Have led launch set OutputResultJSONPath kitchen argument
93e7d934e [led] Add the ability for led edit-isolated to take a transform program.
f5808de3a Fix many shadowed symbols
371e55885 Fix many misspellings
1cc5f65cf [led edit-isolated] Fix bug when inputsref is missing.
R=tandrii@chromium.org
Change-Id: I8bef431fe57f7331a8f5fc85e898916ee93fa9f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1788412
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This version can load external proto descriptors. No other significant changes.
TBR=tandrii@chromium.org, iannucci@chromium.org
BUG=986972
Change-Id: I26317512ffcee0a50e051032d30ec79bbd805644
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778707
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Auto-Submit: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This method allows retrieving the owners listed in a file, as well as those
transitively listed in files included by it. This change also adds a new test to
cover this method, which is just a wrapper for the existing
_read_just_the_owners() internal method.
Bug: None
Change-Id: Iee956f115d3846acf0ee0806451807b0aa96d2f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1773904
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Pylint-1.7+ include a score report by default at the end of every
module lint. We disable reports in general, so silence this too.
Bug: 866772
Change-Id: Ie3df44c80b90daa59e46c8fd37a949176c9b09a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1770420
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Has different protobuf guts. The only observable side effect is different
formatting of generated files. But 'lucicfg validate' now compares files
semantically, so different formatting shouldn't matter.
There's a bunch of other internal changes, but clients that rely on them are
already aware and updated.
R=iannucci@chromium.org
BUG=986972
Change-Id: Ifd13c453736e438f28c2cf938003dce00f2cb199
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769607
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
The parsing logic for OWNERS files included via "file:" lines currently
rejects inline comments (e.g. "foo@example.com # for foo.cc"), while
the normal OWNERS parsing logic correctly ignores such inline comments.
This CL makes the inline case ignore inline comments too.
Bug: 995474
Change-Id: I6f30554daf0a5f63b81719dced44f59187707eaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769603
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Don't overwrite passed kwargs. Make a copy instead.
Otherwise, subsequent calls with the same kwargs will have
stdin set to subprocess.PIPE.
Bug: 984182
Change-Id: I358ffa1951e8b42486e0ac3a0d3d587a93c6dc4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769405
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Add run_on_python2 and run_on_python3 to allow to be tests on
either only python2, only python3 or both.
Bug: 984182
Change-Id: I87d3b67412129cf3a8e627cd6bc97daa81147657
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1758849
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: smut <smut@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
On the wasm team we build several CMake-based projects with ninja
(LLVM, binaryen, etc), and its useful for us (me at least) to be able
to use autoninja with these project too.
Change-Id: I7e213448dbbe95ffe3d249c9c6a3d4baa41f50d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1682742
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Sam Clegg <sbc@chromium.org>
Changes like crrev.com/c/1752507, where a file that was previously in
.gitignore becomes part of the repo, makes update_depot_tools fail
to rebase.
Use git checkout origin/master instead.
Bug: 996359
Change-Id: Ib1a43b8842cebce96ab1fabaedc8e5653b9a708e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764708
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
A new-line token is being added on Python 3, so add it explicitly
so that it also appears on Python 2.
Bug: 984182
Change-Id: I3bfb6ca83d94b6a3452b938f35f5a3174fe85903
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764465
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This allows people to pin a specific version of pylint when running
it. The default behavior is unchanged: we run pylint-1.5.6 still
as we've created a vpython wheel in cipd for it. But for projects
that want to move to a newer version, they can pick any of the new
1.x wrappers. Having the full set of versions here allows projects
to incrementally move to newer versions as the lint delta between
1.5 & 1.6 tends to be much smaller than 1.5 & 1.9.
We don't include support for the newer 2.x series as those only
support Python 3 which the codebase isn't ready for.
Bug: 866772
Test: `./pylint ...` still works & shows pylint-1.5
Test: `./pylint-1.5 ...` runs the v1.5 version
Test: `./pylint-1.8 ...` runs the v1.8 version
Change-Id: I7c47187493564db81e3eb28c6dbd09e6309ead46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1752507
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Windows 10 has support for native ANSI control codes.
This means we don't have to wrap stdout/stderr with Colorama, which uses old CMD APIs to handle these sequences.
This change inadvertently also works around an issue on Python 3 where Colorama errors when bytes are output by gclient_utils.CheckCallAndFilter due to not wrapping sys.stdout.buffer.
Bug: 942522
Change-Id: Ic7dde620b01bd94eb50de353bfc0276cad045a45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1735566
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>