From d261b065d09046bbcc6594e48220cff44a371732 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Mon, 26 Jun 2017 16:54:43 -0400 Subject: Improve PNG presubmit check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL improves the PNG presubmit check by using ideas from the corpus repository check. Change-Id: I3809da4cca69c867335ff28eea6cfcb025efbb4b Reviewed-on: https://pdfium-review.googlesource.com/6991 Commit-Queue: Nicolás Peña Reviewed-by: Lei Zhang --- PRESUBMIT.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'PRESUBMIT.py') diff --git a/PRESUBMIT.py b/PRESUBMIT.py index e8d8458ec0..a7db1230d4 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -279,11 +279,11 @@ def _CheckTestDuplicates(input_api, output_api): def _CheckPNGFormat(input_api, output_api): """Checks that .png files have a format that will be considered valid by our test runners. If a file ends with .png, then it must be of the form - NAME_expected{,mac,win}.pdf.#.png""" + NAME_expected(_(win|mac|linux))?.pdf.#.png""" expected_pattern = input_api.re.compile( - r'.*_expected(_(mac|win))?\.pdf\..*\.png') + r'.+_expected(_(win|mac|linux))?\.pdf\.\d+.png') results = [] - for f in input_api.AffectedFiles(): + for f in input_api.AffectedFiles(include_deletes=False): if not f.LocalPath().endswith('.png'): continue if expected_pattern.match(f.LocalPath()): -- cgit v1.2.3