[tools] Clean up presubmit and run all unittests
NOTRY=true Bug: v8:8763 Change-Id: I9b4e2edbb5f1eeeaa88d35efaa25a4eb0c35c95c Reviewed-on: https://chromium-review.googlesource.com/c/1449612 Commit-Queue: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org> Cr-Commit-Position: refs/heads/master@{#59279}
This commit is contained in:
parent
101fd4ddb7
commit
f4a4104fe5
@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
def CheckChangeOnCommit(input_api, output_api):
|
def CheckChangeOnCommit(input_api, output_api):
|
||||||
tests = input_api.canned_checks.GetUnitTestsInDirectory(
|
tests = input_api.canned_checks.GetUnitTestsInDirectory(
|
||||||
input_api, output_api, 'unittests')
|
input_api, output_api, 'unittests', whitelist=[r'.+_test\.py$'])
|
||||||
return input_api.RunTests(tests)
|
return input_api.RunTests(tests)
|
||||||
|
@ -2,9 +2,17 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
def _CommonChecks(input_api, output_api):
|
||||||
|
return input_api.RunTests(input_api.canned_checks.GetUnitTestsRecursively(
|
||||||
|
input_api,
|
||||||
|
output_api,
|
||||||
|
input_api.os_path.join(input_api.PresubmitLocalPath()),
|
||||||
|
whitelist=[r'.+_unittest\.py$'],
|
||||||
|
blacklist=[],
|
||||||
|
))
|
||||||
|
|
||||||
|
def CheckChangeOnUpload(input_api, output_api):
|
||||||
|
return _CommonChecks(input_api, output_api)
|
||||||
|
|
||||||
def CheckChangeOnCommit(input_api, output_api):
|
def CheckChangeOnCommit(input_api, output_api):
|
||||||
tests = input_api.canned_checks.GetUnitTestsInDirectory(
|
return _CommonChecks(input_api, output_api)
|
||||||
input_api, output_api, '../unittests', whitelist=['run_tests_test.py$'])
|
|
||||||
tests += input_api.canned_checks.GetUnitTestsInDirectory(
|
|
||||||
input_api, output_api, 'testproc', whitelist=['variant_unittest.py$'])
|
|
||||||
return input_api.RunTests(tests)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user