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: Gavin Mak <gavinmak@google.com>
changes/42/3717242/3
Bruce Dawson 3 years ago committed by LUCI CQ
parent dd8da39995
commit 1d5d7803fa

@ -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

Loading…
Cancel
Save