Commit c1e1d099 authored by Samuel Huang's avatar Samuel Huang Committed by LUCI CQ

[Presubmit] Allow GetUnitTestsRecursively() to restrict Python versions.

GetUnitTests() has named params {run_on_python2, run_on_python3}.
This CL adds these params to GetUnitTestsRecursively() so they can be
forwarded to GetUnitTests().

Bug: https://crbug.com/1054018
Change-Id: I06ac25a37f94cdea1cdc91954b70113e54cfdd15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2107610Reviewed-by: 's avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
parent a30b7bd3
......@@ -688,7 +688,8 @@ def GetUnitTests(
def GetUnitTestsRecursively(input_api, output_api, directory,
whitelist, blacklist):
whitelist, blacklist, run_on_python2=True,
run_on_python3=True):
"""Gets all files in the directory tree (git repo) that match the whitelist.
Restricts itself to only find files within the Change's source repo, not
......@@ -714,7 +715,9 @@ def GetUnitTestsRecursively(input_api, output_api, directory,
% (found, whitelist, blacklist, directory))
]
return GetUnitTests(input_api, output_api, tests)
return GetUnitTests(input_api, output_api, tests,
run_on_python2=run_on_python2,
run_on_python3=run_on_python3)
def GetPythonUnitTests(input_api, output_api, unit_tests):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment