0

Enable evaluate_patches to have a configurable number of patches.

I sort of want to let me machine run a bit longer then 100, and sometimes when testing I just want it to do something small. Having to go edit it each time is annoying. Add the ability to pass a raw argument and use that as the patch limit. Then my crontab can just use that to pass it along.
----
evaluate_patches: Add an option to set a limit of patches to evaluate.

BEGIN_PUBLIC

Change-Id: I6c0348a0d666ac9b285d1ddf26ced2d04a0b04be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6290725
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Auto-Submit: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424280}
This commit is contained in:
Stephen Nusko
2025-02-24 18:38:40 -08:00
committed by Chromium LUCI CQ
parent d89242dde1
commit fed49bcc1e

@ -26,6 +26,9 @@ from datetime import datetime
# google-api-python-client \
# google-auth-httplib2 \
# google-auth-oauthlib
#
# In addition when invoking evaluate_patches.py you can pass an optional integer
# argument which will set the limit of patches to evaluate. Default is 100.
# ```
from google.auth.transport.requests import Request
@ -225,6 +228,8 @@ run("autoninja -C out/linux", "Failed to build the project.")
# Create and evaluate patches
try:
patch_limit = 100
if len(sys.argv) > 1:
patch_limit = int(sys.argv[1])
for patch in patches:
# Limit the number of patches to evaluate. We don't want to spent too
# many resources on this.