diff options
Diffstat (limited to 'infra/presubmit.py')
-rwxr-xr-x | infra/presubmit.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/infra/presubmit.py b/infra/presubmit.py index f8cf0110..a4d61bdc 100755 --- a/infra/presubmit.py +++ b/infra/presubmit.py @@ -334,16 +334,16 @@ def run_tests(): for file in get_changed_files(): changed_dirs.add(os.path.dirname(file)) - # TODO(metzman): This approach for running tests is probably flawed since - # tests can fail even if their directory isn't changed. Figure out if it is - # needed (to save time) and remove it if it isn't. + # TODO(metzman): This approach for running tests is flawed since tests can + # fail even if their directory isn't changed. Figure out if it is needed (to + # save time) and remove it if it isn't. suite_list = [] for change_dir in changed_dirs: suite_list.append(unittest.TestLoader().discover(change_dir, pattern='*_test.py')) - full_suite = unittest.TestSuite(suite_list) - result = unittest.TextTestRunner().run(full_suite) - return not result.failures + suite = unittest.TestSuite(suite_list) + result = unittest.TextTestRunner().run(suite) + return not result.failures and not result.errors def main(): |