Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: native_client_sdk/src/doc/PRESUBMIT.py

Issue 180003003: [NaCl SDK Docs] Fix README, cleanup Makefile, remove devsite stuff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified presubmit so I can dcommit Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « native_client_sdk/src/doc/Makefile ('k') | native_client_sdk/src/doc/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import subprocess 5 import subprocess
6 6
7 def _CheckSphinxBuild(input_api, output_api): 7 def _CheckSphinxBuild(input_api, output_api):
8 """Check that the docs are buildable without any warnings. 8 """Check that the docs are buildable without any warnings.
9 9
10 This check runs sphinx-build with -W so that warning are errors. 10 This check runs sphinx-build with -W so that warning are errors.
11 11
12 However, since the trybots don't have sphinx installed, we'll treat a sphinx 12 However, since the trybots don't have sphinx installed, we'll treat a sphinx
13 failure as a warning. (Let's trust that the docs editors are testing locally.) 13 failure as a warning. (Let's trust that the docs editors are testing locally.)
14 """ 14 """
15 15
16 try: 16 try:
17 # Don't do a full chromesite build (takes about a minute...), just build 17 subprocess.check_output(['make', 'presubmit', 'SPHINXOPTS=-Wa'],
18 # the ReST.
19 subprocess.check_output(['make', 'chromesite_rst', 'SPHINXOPTS=-Wa'],
20 stderr=subprocess.STDOUT) 18 stderr=subprocess.STDOUT)
21 except subprocess.CalledProcessError as e: 19 except subprocess.CalledProcessError as e:
22 return [output_api.PresubmitNotifyResult('sphinx_build failed:\n' + 20 return [output_api.PresubmitNotifyResult('sphinx_build failed:\n' +
23 e.output)] 21 e.output)]
24 22
25 return [] 23 return []
26 24
27 25
28 def CommonChecks(input_api, output_api): 26 def CommonChecks(input_api, output_api):
29 output = [] 27 output = []
30 output.extend(_CheckSphinxBuild(input_api, output_api)) 28 output.extend(_CheckSphinxBuild(input_api, output_api))
31 return output 29 return output
32 30
33 31
34 def CheckChangeOnUpload(input_api, output_api): 32 def CheckChangeOnUpload(input_api, output_api):
35 return CommonChecks(input_api, output_api) 33 return CommonChecks(input_api, output_api)
36 34
37 35
38 def CheckChangeOnCommit(input_api, output_api): 36 def CheckChangeOnCommit(input_api, output_api):
39 return CommonChecks(input_api, output_api) 37 return CommonChecks(input_api, output_api)
OLDNEW
« no previous file with comments | « native_client_sdk/src/doc/Makefile ('k') | native_client_sdk/src/doc/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698