1. 02 Jun, 2022 2 commits
    • Bruce Dawson's avatar
      Reland "Fix not-run-test detection." · 8f1fea02
      Bruce Dawson authored
      This reverts commit 013e47be.
      
      Reason for revert: This will be relanded as a warning, although the
      bugs which the original change exposed should be fixed soon.
      
      Original change's description:
      > Revert "Fix not-run-test detection."
      >
      > This reverts commit 41691abe.
      >
      > Reason for revert: I thought https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3683378 would solve the problem but turns out this is the issue where it now reports it as a critical error.
      >
      > Original change's description:
      > > Fix not-run-test detection.
      > >
      > > In crrev.com/c/2986400 the skip_shebang_check flag was added to address
      > > the problem of some tests being run neither on Python 2 or Python 3. At
      > > the same time reporting was added to warn if tests were run on neither
      > > Python version.
      > >
      > > Unfortunately the reporting code was incorrect. A PresubmitPromptWarning
      > > object was created but was not added to the list of results, so it had
      > > no effect. Also the skipped tests name was added where a list was
      > > expected which meant that each character of the test name showed up on
      > > its own line.
      > >
      > > This change fixes the reporting. It also changes the format of the
      > > report and makes it an error - a failure to run tests at all deserves
      > > that severity level.
      > >
      > > A test run with the fixed check showed that no errors have crept in -
      > > all tests were being run with one or the other. However the fix did
      > > find a bug in an in-progress change I was working on.
      > >
      > > Bug: 1223478
      > > Change-Id: Ibb44b5e60e7a7a5de08302f19ee4035cdfac5212
      > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3674199
      > > Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
      > > Commit-Queue: Fabrice de Gans <fdegans@chromium.org>
      > > Reviewed-by: Fabrice de Gans <fdegans@chromium.org>
      >
      > Bug: 1223478
      > Change-Id: If4395e90784c3f91692f398b4e5230a51139f78a
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3683105
      > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      > Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
      
      Bug: 1223478, 1330859
      Change-Id: I6a0a78e70db77c9c5fda5bab27960cd4e71279e5
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3685349Reviewed-by: 's avatarFabrice de Gans <fdegans@chromium.org>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      8f1fea02
    • Bruce Dawson's avatar
      Reland "Add Python 3 support to GetPythonUnitTests" · f3d894fd
      Bruce Dawson authored
      This reverts commit c03ebf0e.
      
      Reason for revert: the original change was not the cause of the test
      failures. The actual cause was crrev.com/c/3683105 which was reverted.
      
      Original change's description:
      > Revert "Add Python 3 support to GetPythonUnitTests"
      >
      > This reverts commit dfc71bbe.
      >
      > Reason for revert: Breaks all presubmits that do not have skip_shebang_check=True set.
      >
      > Original change's description:
      > > Add Python 3 support to GetPythonUnitTests
      > >
      > > GetPythonUnitTests (and by extension RunPythonUnitTests) always ran
      > > scripts using Python 2. This change adds a python3=False parameter to
      > > GetPythonUnitTests to give the option of switching to Python 3, while
      > > leaving the default as Python 2. The child scripts are run under one or
      > > the other, based on this parameter.
      > >
      > > This change is needed in support of crrev.com/c/3679801.
      > >
      > > Bug: 1313804
      > > Change-Id: Ic59287352d4941707adaf7981ed7af4201b7d526
      > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3680099
      > > Reviewed-by: Jesse McKenna <jessemckenna@google.com>
      > > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      >
      > Bug: 1313804
      > Change-Id: I1bd7096b6cfdfed6205e6dc0b5d4498b5b821b97
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3683378
      > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      > Commit-Queue: Christoffer Jansson <jansson@chromium.org>
      > Owners-Override: Ben Pastene <bpastene@chromium.org>
      > Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
      
      Bug: 1313804
      Change-Id: I15ed90cc35d88ece71eb681acc0acc06cb5c3bcc
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3685229
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      Reviewed-by: 's avatarJesse McKenna <jessemckenna@google.com>
      f3d894fd
  2. 01 Jun, 2022 7 commits
  3. 31 May, 2022 4 commits
  4. 27 May, 2022 7 commits
  5. 26 May, 2022 1 commit
    • Bruce Dawson's avatar
      Optimize presubmit --all with --no_diffs option · 09c0c073
      Bruce Dawson authored
      Some of the expensive checks when running presubmit --all, such as
      CheckStableMojomChanges (~300 s) and CheckAddedDepsHaveTargetApprovals
      (~200 s) only look at diffs and are therefore guaranteed to be NOPs when
      running presubmit --all or --files=. Passing along the no_diffs state
      lets these expensive checks be skipped, thus allowing for faster
      iteration times.
      
      Initial testing suggests that (with some supporting changes in the
      Chromium repo) this reduces "presubmit --all" times by about ten
      minutes, or a bit more than 10%, and additional improvements may be
      possible.
      
      Special handling for the no-diffs case also offers a simple way to avoid
      presubmit failures that happen whenever all files are flagged as being
      changed.
      
      Finally, and perhaps most importantly for having a presubmit --all bot,
      when --no_diffs is passed we can treat errors like "Issue wasn't
      uploaded" and "Add a description to the CL" as messages, thus making it
      possible to have zero presubmit errors when run on origin/main.
      
      Bug: 1320937, 1322936
      Change-Id: I0d09dd4aae8fdaa48c8b2f89337441cf96dcff72
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3628368
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
      09c0c073
  6. 25 May, 2022 3 commits
  7. 24 May, 2022 4 commits
  8. 23 May, 2022 4 commits
  9. 21 May, 2022 1 commit
  10. 20 May, 2022 3 commits
  11. 19 May, 2022 3 commits
  12. 18 May, 2022 1 commit