From e5feab93a91339e1204e2e9e1b9ab40e252d4c80 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 29 Sep 2020 17:55:00 +0100 Subject: [PATCH] doc: hide sphinx standard output 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 --- buildtools/call-sphinx-build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index fa6f26b376..0dce59f641 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -27,8 +27,10 @@ for root, dirs, files in os.walk(src): 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: -- 2.20.1