Commit bfe75748 authored by binji@chromium.org's avatar binji@chromium.org

[PPAPI] Make the NaCl SDK presubmit check a warning instead of an error.

There are some PPAPI dev interfaces that should not be added to the SDK, so it
is better to warn instead of making it a presubmit error.

BUG=none
R=teravest@chromium.org
TEST=made change to ppapi/cpp/buffer_dev.h, ran git cl presubmit

Review URL: https://codereview.chromium.org/379923010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282637 0039d316-1c4b-4281-b951-d872f2087c98
parent 4d56acce
......@@ -8,16 +8,20 @@ import sys
import subprocess
def RunCmdAndCheck(cmd, err_string, output_api, cwd=None):
def RunCmdAndCheck(cmd, err_string, output_api, cwd=None, warning=False):
results = []
p = subprocess.Popen(cmd, cwd=cwd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
(p_stdout, p_stderr) = p.communicate()
if p.returncode:
results.append(
output_api.PresubmitError(err_string,
long_text=p_stderr))
if warning:
results.append(output_api.PresubmitPromptWarning(
'%s\n\n%s' % (err_string, p_stderr)))
else:
results.append(
output_api.PresubmitError(err_string,
long_text=p_stderr))
return results
......@@ -141,8 +145,11 @@ def CheckUpdatedNaClSDK(input_api, output_api):
'verify_ppapi.py')
cmd = [sys.executable, verify_ppapi_py] + nacl_sdk_files
return RunCmdAndCheck(cmd,
'PPAPI Interface modified without updating NaCl SDK.',
output_api)
'PPAPI Interface modified without updating NaCl SDK.\n'
'(note that some dev interfaces should not be added '
'the NaCl SDK; when in doubt, ask a ppapi OWNER.)',
output_api,
warning=True)
# Verify that changes to ppapi/thunk/interfaces_* files have a corresponding
# change to tools/metrics/histograms/histograms.xml for UMA tracking.
......
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