From 1d5d7803fa53fb3a86684d45fa968ea05330dbf1 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Thu, 23 Jun 2022 02:24:03 +0000 Subject: [PATCH] Make not-run tests an error again If a presubmit test is misconfigured then it may end up running on neither Python 2 nor Python 3. This was supposed to trigger a warning but the warning code was broken for almost a year. It was then fixed so that it issued an error, but that caused some breakage, so it was made a warning. The known problems with tests not running at all have been fixed and the warning has been on for over two weeks so this change turns the warning back into an error. This is appropriate because a test that is not run at all is a serious bug. This change will allow us to move more confidently when switching tests to Python 3, and it shouldn't cause any additional breakage. Bug: 1330859 Change-Id: I51028bb9c896c60c5cf3ccb6f472ade0bb1e0c16 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3717242 Commit-Queue: Bruce Dawson Reviewed-by: Gavin Mak --- presubmit_canned_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 6ca36973a6..9dc48e2fd2 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -839,7 +839,7 @@ def GetUnitTests(input_api, message=message_type)) test_run = True if not test_run: - results.append(output_api.PresubmitPromptWarning( + results.append(output_api.PresubmitError( "The %s test was not run. You may need to add\n" "skip_shebang_check=True for python3 tests." % unit_test)) return results