diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-03-17 13:30:11 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-03-17 13:30:11 -0700 |
commit | a8fd0e8a871c04ba675fa605e137bea103db64c1 (patch) | |
tree | d077305c266a1022860c7f5824174013cd0b5140 /testing/tools/run_pixel_tests.py | |
parent | 9519ab204626a7c03bbd3157bdd5e4eca96680d1 (diff) | |
download | pdfium-a8fd0e8a871c04ba675fa605e137bea103db64c1.tar.xz |
Merge to XFA: Return OS status code from python test driver scripts.
Original Review URL: https://codereview.chromium.org/1014083003
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1011243002
Diffstat (limited to 'testing/tools/run_pixel_tests.py')
-rwxr-xr-x | testing/tools/run_pixel_tests.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/testing/tools/run_pixel_tests.py b/testing/tools/run_pixel_tests.py index 3cd9a0a060..9bd321b560 100755 --- a/testing/tools/run_pixel_tests.py +++ b/testing/tools/run_pixel_tests.py @@ -40,6 +40,8 @@ def generate_and_test(input_filename, source_dir, working_dir, i += 1 except subprocess.CalledProcessError as e: print "FAILURE: " + input_filename + "; " + str(e) + return False + return True def main(): parser = optparse.OptionParser() @@ -90,14 +92,17 @@ def main(): if not os.path.exists(working_dir): os.makedirs(working_dir) + os_exit_code = 0 input_file_re = re.compile('^[a-zA-Z0-9_.]+[.]in$') for input_filename in os.listdir(source_dir): if input_file_re.match(input_filename): input_path = os.path.join(source_dir, input_filename) if os.path.isfile(input_path): - generate_and_test(input_filename, source_dir, working_dir, - fixup_path, pdfium_test_path, pdfium_diff_path) - return 0 + if not generate_and_test(input_filename, source_dir, working_dir, + fixup_path, pdfium_test_path, pdfium_diff_path): + os_exit_code = 1 + + return os_exit_code if __name__ == '__main__': |