Commit 1d5d7803 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

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 <brucedawson@chromium.org>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
parent dd8da399
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment