[4/4] doc/guides: suppress printing out standard output

Message ID 20200929153413.280581-5-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Headers
Series improve output when building docs |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed

Commit Message

Bruce Richardson Sept. 29, 2020, 3:34 p.m. UTC
  To see only errors and warnings from the doc builds, we can send the
standard output text to a logfile and have only the stderr messages
printed. This is similar to what is done for the API documentation.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/call-sphinx-build.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Patch

diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py
index fa6f26b37..0dce59f64 100755
--- a/buildtools/call-sphinx-build.py
+++ b/buildtools/call-sphinx-build.py
@@ -27,8 +27,10 @@ 
     srcfiles.extend([join(root, f) for f in files])
 
 # run sphinx, putting the html output in a "html" directory
-process = run(sphinx_cmd + ['-b', 'html', src, join(dst, 'html')], check=True)
-print(str(process.args) + ' Done OK')
+with open(join(dst, 'sphinx_html.out'), 'w') as out:
+    process = run(sphinx_cmd + ['-b', 'html', src, join(dst, 'html')],
+                  check=True,
+                  stdout=out)
 
 # create a gcc format .d file giving all the dependencies of this doc build
 with open(join(dst, '.html.d'), 'w') as d: