aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/presubmit.py
diff options
context:
space:
mode:
authorGravatar jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2020-05-28 10:14:57 -0700
committerGravatar GitHub <noreply@github.com>2020-05-28 10:14:57 -0700
commit659d4e82280b185777f2ba5fe39327de9ce83d88 (patch)
treea34c044ef33df90383cc6d162843c651dd429c55 /infra/presubmit.py
parent21b4c78861d69f7bf3faeaeedeb7e5f4602b8904 (diff)
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
Diffstat (limited to 'infra/presubmit.py')
-rwxr-xr-xinfra/presubmit.py12
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():