Commit Graph

16 Commits (main)

Author SHA1 Message Date
Mike Frysinger f38dc929a8 testing_support: switch to 4 space indent
Reformat this dir by itself to help merging with conflicts with other CLs.

Reformatted using:
parallel ./yapf -i -- testing_support/*.py
~/chromiumos/chromite/contrib/reflow_overlong_comments testing_support/*.py

The files that still had strings that were too long were manually
reformatted.
testing_support/coverage_utils.py
testing_support/fake_repos.py
testing_support/git_test_utils.py
testing_support/presubmit_canned_checks_test_mocks.py

Change-Id: I4726a4bbd279a70bcf65d0987fcff0ff9a231386
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4842593
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
2 years ago
Dan Le Febvre 456d085e75 Adding batch CIPD version resolution to gclient.
At the moment on repo's with many CIPD packages the number
of CLI calls to 'cipd describe' can make it very slow.

This mechanism will call cipd ensure-file-resolve with the entire
list in one call then reference items from the list before trying
individual cipd describe commands.

Bug:b/279097790
Change-Id: Ieb4bc77853357cfadb3ea6311fa0013aa7999ac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4551125
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 years ago
Dan Le Febvre 39e668df57 support cipd describe command in cipd testing
The contents of this change, imitate the exact behaviour of the real CIPD command.

Bug:b/279097790
Change-Id: Id7e0e906b59e8c7c08b235e2741431163b0387a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4536477
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 years ago
Dan Le Febvre 6316ac234e [ssci] adding gclient testing support for the CIPD expand package cmd
Bug:b/279097790
Change-Id: I1edf1c33333bf4ddd32bf462f5d23733097c25d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4529697
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 years ago
Alexander Thomas 24996afd00 Revert "Reland "resolve CIPD package names in gclient""
This reverts commit d69302761b.

Reason for revert: Broke Dart CI
```
gclient.py revinfo --output-json output.json
   --filter='https://chrome-infra-packages.appspot.com/dart/dart-sdk/${platform}'
```

No longer returns:
```
 {
   "sdk/tools/sdks/dart-sdk:dart/dart-sdk/${platform}": {
     "rev": "git_revision:7a6514d1377175decd3a886fe4190fbbebddac3a", 
     "url": "https://chrome-infra-packages.appspot.com/dart/dart-sdk/${platform}"
   }
 }
```

Bad build:
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-msan-linux-release-x64/90/overview
Good build:
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/vm-aot-msan-linux-release-x64/89/overview

Original change's description:
> Reland "resolve CIPD package names in gclient"
>
> This CL relands the below CL with the addition of handling situations where the CIPD package name has a variable=value and does not equate to true. In this case just return the original value in DEPS.
>
> This is a reland of commit 8faa5514ec
>
> Original change's description:
> > resolve CIPD package names in gclient
> >
> > Currently the package names are not resolved in gclient output, see example below.
> >
> > This is part of broader work to improve CIPD output, the next CL will replace 'None'.
> >
> > ```
> > $~ gclient revinfo -a | grep '${platform}\|${arch}'
> >
> > src/buildtools/linux64:gn/gn/linux-${arch}: None
> > src/buildtools/reclient:infra/rbe/client/${platform}: None
> > src/third_party/dawn/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> > src/third_party/dawn/tools/golang:infra/3pp/tools/go/${platform}: None
> > src/third_party/devtools-frontend-internal/devtools-frontend/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> > src/third_party/devtools-frontend/src/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> > src/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> > src/tools/luci-go:infra/tools/luci/isolate/${platform}: None
> > src/tools/luci-go:infra/tools/luci/swarming/${platform}: None
> > src/tools/resultdb:infra/tools/result_adapter/${platform}: None
> > ```
> >
> > Bug:b/279097790
> > Change-Id: I21abf2579910e9d79d9ee0dcd018ee761e3d3c1c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4463983
> > Reviewed-by: Rachael Newitt <renewitt@google.com>
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
> > Commit-Queue: Dan Le Febvre <dlf@google.com>
>
> Bug: b/279097790
> Change-Id: Ib08dac506ce221243c595dde5cb00e8e0d7dc7ed
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4501582
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Dan Le Febvre <dlf@google.com>

Bug: b/279097790
Change-Id: Ibf82354ac5005d9d6279d88aa99c8fb344aa6833
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4518113
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Dan Le Febvre <dlf@google.com>
2 years ago
Dan Le Febvre d69302761b Reland "resolve CIPD package names in gclient"
This CL relands the below CL with the addition of handling situations where the CIPD package name has a variable=value and does not equate to true. In this case just return the original value in DEPS.

This is a reland of commit 8faa5514ec

Original change's description:
> resolve CIPD package names in gclient
>
> Currently the package names are not resolved in gclient output, see example below.
>
> This is part of broader work to improve CIPD output, the next CL will replace 'None'.
>
> ```
> $~ gclient revinfo -a | grep '${platform}\|${arch}'
>
> src/buildtools/linux64:gn/gn/linux-${arch}: None
> src/buildtools/reclient:infra/rbe/client/${platform}: None
> src/third_party/dawn/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> src/third_party/dawn/tools/golang:infra/3pp/tools/go/${platform}: None
> src/third_party/devtools-frontend-internal/devtools-frontend/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> src/third_party/devtools-frontend/src/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> src/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> src/tools/luci-go:infra/tools/luci/isolate/${platform}: None
> src/tools/luci-go:infra/tools/luci/swarming/${platform}: None
> src/tools/resultdb:infra/tools/result_adapter/${platform}: None
> ```
>
> Bug:b/279097790
> Change-Id: I21abf2579910e9d79d9ee0dcd018ee761e3d3c1c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4463983
> Reviewed-by: Rachael Newitt <renewitt@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Dan Le Febvre <dlf@google.com>

Bug: b/279097790
Change-Id: Ib08dac506ce221243c595dde5cb00e8e0d7dc7ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4501582
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 years ago
Dan Le Febvre f2da906faf Revert "resolve CIPD package names in gclient"
This reverts commit 8faa5514ec.

Reason for revert: cipd expand-package-name errors on wrong platform

Original change's description:
> resolve CIPD package names in gclient
>
> Currently the package names are not resolved in gclient output, see example below.
>
> This is part of broader work to improve CIPD output, the next CL will replace 'None'.
>
> ```
> $~ gclient revinfo -a | grep '${platform}\|${arch}'
>
> src/buildtools/linux64:gn/gn/linux-${arch}: None
> src/buildtools/reclient:infra/rbe/client/${platform}: None
> src/third_party/dawn/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> src/third_party/dawn/tools/golang:infra/3pp/tools/go/${platform}: None
> src/third_party/devtools-frontend-internal/devtools-frontend/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> src/third_party/devtools-frontend/src/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
> src/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
> src/tools/luci-go:infra/tools/luci/isolate/${platform}: None
> src/tools/luci-go:infra/tools/luci/swarming/${platform}: None
> src/tools/resultdb:infra/tools/result_adapter/${platform}: None
> ```
>
> Bug:b/279097790
> Change-Id: I21abf2579910e9d79d9ee0dcd018ee761e3d3c1c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4463983
> Reviewed-by: Rachael Newitt <renewitt@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Dan Le Febvre <dlf@google.com>

Bug: b/279097790
Change-Id: I0beba8606d8cceeb815629d6eae6d8021c7731a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4501579
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Auto-Submit: Dan Le Febvre <dlf@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Owners-Override: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
2 years ago
Dan Le Febvre 8faa5514ec resolve CIPD package names in gclient
Currently the package names are not resolved in gclient output, see example below.

This is part of broader work to improve CIPD output, the next CL will replace 'None'.

```
$~ gclient revinfo -a | grep '${platform}\|${arch}'

src/buildtools/linux64:gn/gn/linux-${arch}: None
src/buildtools/reclient:infra/rbe/client/${platform}: None
src/third_party/dawn/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
src/third_party/dawn/tools/golang:infra/3pp/tools/go/${platform}: None
src/third_party/devtools-frontend-internal/devtools-frontend/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
src/third_party/devtools-frontend/src/third_party/esbuild:infra/3pp/tools/esbuild/${platform}: None
src/third_party/ninja:infra/3pp/tools/ninja/${platform}: None
src/tools/luci-go:infra/tools/luci/isolate/${platform}: None
src/tools/luci-go:infra/tools/luci/swarming/${platform}: None
src/tools/resultdb:infra/tools/result_adapter/${platform}: None
```

Bug:b/279097790
Change-Id: I21abf2579910e9d79d9ee0dcd018ee761e3d3c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4463983
Reviewed-by: Rachael Newitt <renewitt@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 years ago
Brian Ryner 9acd55ea89 Have fake_cipd accept 'export' in addition to 'ensure'.
Change-Id: Ia82e81a2d4b5fc37856e9abbda79681b61f6fcd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4492323
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Brian Ryner <bryner@google.com>
2 years ago
Josip Sokcevic 3912091152 Use py3 for remaining tools in depot_tools path
R=apolito@google.com, dpranke@google.com

Bug: 1199102
Change-Id: I06ff344ac91464eb558e92598c87e43ecfa830dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2994488
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
4 years ago
Edward Lesmes 05934953bf gclient: Make smoketests run on Windows.
Bug: 1024683
Change-Id: I1c30473699c1bd6b198188b53b632e3617fed335
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1929653
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur ca8793223a gclient: Fix gclient Python 3 errors and add to presubmit tests.
Bug: 984182
Change-Id: I06e88f56aebf31c0c1ca495e6cbf03b6698b3676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1790603
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur 647e1e79eb Reland "gclient: delete unversioned directory before adding cipd dep for the same path"
This is a reland of 67ef3f67e8

We no longer call cipd unconditionally.

Original change's description:
> gclient: delete unversioned directory before adding cipd dep for the same path
>
> Bug: 882611
> Change-Id: I46e41cc9693b90874b5d6569a12ec638eaac1050
> Reviewed-on: https://chromium-review.googlesource.com/1228655
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

Bug: 882611
Change-Id: I683bfc62bd1eebfec0853583f96f3981c2c6bdf2
Reviewed-on: https://chromium-review.googlesource.com/1232891
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 07b5283a4e Revert "gclient: delete unversioned directory before adding cipd dep for the same path"
This reverts commit 67ef3f67e8.

Reason for revert: might have broken GCE/ccompute fleet.

Original change's description:
> gclient: delete unversioned directory before adding cipd dep for the same path
> 
> Bug: 882611
> Change-Id: I46e41cc9693b90874b5d6569a12ec638eaac1050
> Reviewed-on: https://chromium-review.googlesource.com/1228655
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: Ia2172b1b0d236357edf93dacf57f3bf7d80d5968
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 882611
Reviewed-on: https://chromium-review.googlesource.com/1231699
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lemur 67ef3f67e8 gclient: delete unversioned directory before adding cipd dep for the same path
Bug: 882611
Change-Id: I46e41cc9693b90874b5d6569a12ec638eaac1050
Reviewed-on: https://chromium-review.googlesource.com/1228655
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lemur efe4f897c2 gclient: Add a test to make sure we're syncing CIPD dependencies.
Bug: 849374
Change-Id: I5654ed65843c6dae6b7dbee10a40aa35e16803dc
Reviewed-on: https://chromium-review.googlesource.com/1087390
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago