From 9974bdcdacae9efe1958ad427ee31d604d6e1715 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 22 Nov 2020 11:22:32 +0100 Subject: Doxygen warnings are not seen as errors during running tests Doxygen warnings were on *nix suppressed but shown on Windows though the tests were nevertheless shown as OK - correct redirection under windows - catch doxygen warnings and make the corresponding test fail --- testing/runtests.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/testing/runtests.py b/testing/runtests.py index 6b3e54e..1e17cc9 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -118,6 +118,7 @@ class Tester: print('INPUT=%s/%s' % (self.args.inputdir,self.test), file=f) print('STRIP_FROM_PATH=%s' % self.args.inputdir, file=f) print('EXAMPLE_PATH=%s' % self.args.inputdir, file=f) + print('WARN_LOGFILE=%s/warnings.log' % self.test_out, file=f) if 'config' in self.config: for option in self.config['config']: print(option, file=f) @@ -162,7 +163,7 @@ class Tester: # run doxygen if (sys.platform == 'win32'): - redir=' > nul:' + redir=' > nul: 2>&1' else: redir=' 2> /dev/null > /dev/null' @@ -400,7 +401,12 @@ class Tester: elif not self.args.keep: shutil.rmtree(latex_output,ignore_errors=True) - if failed_xml or failed_html or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd: + warnings = xopen(self.test_out + "/warnings.log",'r',encoding='ISO-8859-1').read() + failed_warn = len(warnings)!=0 + if failed_warn: + msg += (warnings,) + + if failed_warn or failed_xml or failed_html or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd: testmgr.ok(False,self.test_name,msg) return False -- cgit v0.12