From 659d4e82280b185777f2ba5fe39327de9ce83d88 Mon Sep 17 00:00:00 2001 From: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> Date: Thu, 28 May 2020 10:14:57 -0700 Subject: Fix CIFuzz issue where targets assumed in OSS-Fuzz build if exists (#3817) Make some other changes: 1. Refactor fuzz_target.py and fuzz_target_test.py 2. Introduce pyfakefs and parameterized as dependencies and use them in tests. 3. Fix infra-tests in CI so that they use installed dependencies --- infra/presubmit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'infra/presubmit.py') 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(): -- cgit v1.2.3