Commit Graph

17 Commits (main)

Author SHA1 Message Date
Gaby Baghdadi 9d64acedea enable fetch and gclient to run on z/OS part 1
See https://issues.chromium.org/issues/323790693#comment12 for the manual steps still required.

R=gavinmak@google.com

Bug: 323790693
Change-Id: Id0ac2d8a6027cbb5e0554574471c160d5fae807c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5277474
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Gavin Mak edba22d4eb Fix multiline comment formatting
Many incorrectly formatted comments exist from the switch to
4 space indent: https://crrev.com/c/4836379

Bug: 1514505
Change-Id: I6366f9da812919bd35b999f18fa8a49b7a66c09b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5153633
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Aravind Vasudevan 8197d724a6 [detect_host_arch] Cache HostArch() function
From my recent go/gclient-sync-no-ops analysis, I noticed that
HostArch() is repeated called within get_builtin_vars() fn. The
`platform.architecture()` call made in arm-based systems and some x64 is
expensive and adds to gclient sync's runtime when repeatedly called.

When caching HostArch(), I noticed 22.4% speed-up in incremental no-op
gclient sync when run on arm-based machine.

Change-Id: I962c4fb0879d2931268f5bec1678ef782c56e7f2
Bug: 5076224
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5076226
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Gavin Mak f936d540e1 Remove __future__ imports
All __future__ imports (unicode_literals, print_function) are already
mandatory in py3. Also remove an outdated py2 comment in
presubmit_canned_checks.py

Bug: 1475402
Change-Id: I27cf6a8268f6dd1081f22af782c4c29a975376ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4867135
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
Mike Frysinger 124bb8e53c switch to 4 space indent
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.

Reformatted using:
files=( $(
	git ls-tree -r --name-only HEAD | \
		grep -Ev -e '^(third_party|recipes)/' | \
		grep '\.py$';
	git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"

The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py

These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py

Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Robbie Iannucci 3db3276489 Revert "loongarch64: Add loongarch64 architecture detection support."
This reverts commit 0648830632.

Reason for revert: Pending clarity on https://bugs.chromium.org/p/chromium/issues/detail?id=1361860

Original change's description:
> loongarch64: Add loongarch64 architecture detection support.
>
> Bug: 1361860
> Change-Id: I432208fd78fb99140a97b3979a257f4e2e513807
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3886536
> Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Brian Ryner <bryner@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>

Bug: 1361860
Change-Id: Icf9f88a7173d4d403f4846fe01342794a0f5db9e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4667669
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
2 years ago
Wang Qing 0648830632 loongarch64: Add loongarch64 architecture detection support.
Bug: 1361860
Change-Id: I432208fd78fb99140a97b3979a257f4e2e513807
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3886536
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Richard Townsend 1b4407e7c6 Use x64 emulation for Windows on Arm targets
windows-386 packages have started to bit-rot, use the windows-x64
versions instead (this implicitly restricts us to Windows 11)

Change-Id: If5417e9463914d9cb7b2e738ff46ef0faea4d1ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4116709
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Rebecca Chang Swee Fun eb16162e00 Add riscv64 architecture detection
Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
Bug: 1331190
Change-Id: I7c751e5cf02f088f2145c3c701547f0412f2bd69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3686858
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Josip Sokcevic 4de5deacd4 Explicitly run everything with python3
R=aravindvasudev@google.com, gavinmak@google.com

Change-Id: Iaa5e960c6226dea3a0814c7cb778d952eafb1502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525960
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Nico Weber d4da7ca919 gclient: Correctly set host_cpu to arm64 on arm macs
platform.machine() is 'arm64' on arm macs, and the `.startswith('arm')`
branch converted that to 'arm' before this CL.

Bug: 1103236,1190880
Change-Id: Idd75a724f059ecd2dd873737e4998fe9bc937e04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2779414
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
4 years ago
Edward Lemur 9777ab3619 depot_tools: Add tests for detect_host_arch.
Change-Id: Ife5826fc824f1304bc1a8ae09c0a659583f0ffb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1949408
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Raul Tambre b946b2389c Improve gclient Python 3 compatibility
This enables gclient sync and gclient runhooks to run, barring hook script failures.
git cl upload also now works.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 942522
Change-Id: I2ac587b5f803ba7f5bb5e412337ce049f4b1a741
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1524583
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
6 years ago
Milad Farazmand 973788f88d Fixing getting machine arch on AIX running in an LPAR environment
Trying to get "host_cpu" in DEPS file may fail on AIX.
Getting the "machine ID number" using "uname -m" on an AIX box, in an LPAR
environment will not generate a unique machine identifier and instead might
return a string such as "00f9445f4c00". "platform.processor()" will be used
as a fall back on AIX.

Change-Id: I7fada10059e29066f5a13d6135b01eaeaccb769d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1504554
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
6 years ago
Edward Lemur 4ac892e4d1 Use lowercase machine architecture.
Bug: 896355
Change-Id: I83a3c27478029d90206b5bb26e26797df47a90f6
Reviewed-on: https://chromium-review.googlesource.com/c/1287244
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Wang Qing 254538b955 MIPS64: Add support for depot_tools on mips64.
BUG= 865294

R= tandrii@chromium.org

Change-Id: I8ad56887882b897d605dc92e0e61c17de0a74967
Reviewed-on: https://chromium-review.googlesource.com/1141563
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Tom Anderson c31ae0b4a9 Add target_cpu builtin variable to gclient
This CL adds target_cpu and target_cpu_only variables.  The logic is:

* If target_cpu is defined in .gclient, use it.  Otherwise, initialize it as an
  empty list.
* If not target_cpu_only, add the host arch to the list too.

detect_host_arch.py is copied directly from the Chromium repo.

BUG=807986
R=dpranke

Change-Id: I27621cbc81ad6a844648525863b92ffdd3b1d03a
Reviewed-on: https://chromium-review.googlesource.com/902441
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago