Skip to content

Commit 7febced

Browse files
authored
Merge pull request doxygen#11389 from albert-github/feature/bug_tests_man
Create possibility to have also man pages generated in test suite
2 parents e0d6536 + 1748919 commit 7febced

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.github/workflows/build_cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ jobs:
339339
340340
execute_process(
341341
COMMAND
342-
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf"
342+
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --man"
343343
cmake --build build --target tests
344344
RESULT_VARIABLE result
345345
)
@@ -355,7 +355,7 @@ jobs:
355355
356356
execute_process(
357357
COMMAND
358-
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --pdf"
358+
cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --man --pdf"
359359
cmake --build build --target tests
360360
RESULT_VARIABLE result
361361
)

testing/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ optional parameters:
4040
--xhtml create xhtml output and check with xmllint
4141
--xmlxsd create xml output and check with xmllint against xsd
4242
--pdf create LaTeX output and create pdf from it
43+
--man create man output
4344
--subdirs use the configuration parameter CREATE_SUBDIRS=YES
4445
--clang use CLANG_ASSISTED_PARSING, works only when doxygen
4546
has been compiled with "use_libclang"

testing/runtests.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ def prepare_test(self):
174174
print('DOCBOOK_OUTPUT=%s/docbook' % self.test_out, file=f)
175175
else:
176176
print('GENERATE_DOCBOOK=NO', file=f)
177+
if (self.args.man):
178+
print('GENERATE_MAN=YES', file=f)
179+
print('MAN_LINKS=YES', file=f)
180+
print('MAN_OUTPUT=%s/man' % self.test_out, file=f)
181+
else:
182+
print('GENERATE_MAN=NO', file=f)
177183
if (self.args.qhp):
178184
print('GENERATE_QHP=YES', file=f)
179185
if (self.args.xhtml or self.args.qhp):
@@ -291,6 +297,7 @@ def perform_test(self,testmgr):
291297
failed_docbook=False
292298
failed_rtf=False
293299
failed_xmlxsd=False
300+
failed_man=False
294301
msg = ()
295302
# look for files to check against the reference
296303
if self.args.xml or self.args.xmlxsd:
@@ -455,6 +462,10 @@ def perform_test(self,testmgr):
455462
elif not self.args.keep:
456463
shutil.rmtree(docbook_output,ignore_errors=True)
457464

465+
if (self.args.man):
466+
# For future work
467+
pass
468+
458469
if (self.args.xhtml or self.args.qhp):
459470
html_output='%s/html' % self.test_out
460471
if (sys.platform == 'win32'):
@@ -533,7 +544,7 @@ def perform_test(self,testmgr):
533544
if failed_warn:
534545
msg += (warnings,)
535546

536-
if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd:
547+
if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd or failed_man:
537548
testmgr.ok(False,self.test_name,msg)
538549
return False
539550

@@ -659,6 +670,8 @@ def main():
659670
'create qhp output and check with xmllint',action="store_true")
660671
parser.add_argument('--xmlxsd',help=
661672
'create xml output and check with xmllint against xsd',action="store_true")
673+
parser.add_argument('--man',help=
674+
'create man output',action="store_true")
662675
parser.add_argument('--pdf',help='create LaTeX output and create pdf from it',
663676
action="store_true")
664677
parser.add_argument('--subdirs',help='use the configuration parameter CREATE_SUBDIRS=YES',
@@ -677,7 +690,7 @@ def main():
677690
args = parser.parse_args(test_flags + sys.argv[1:])
678691

679692
# sanity check
680-
if (not args.xml) and (not args.pdf) and (not args.xhtml) and (not args.qhp) and (not args.docbook and (not args.rtf) and (not args.xmlxsd)):
693+
if (not args.xml) and (not args.pdf) and (not args.xhtml) and (not args.qhp) and (not args.docbook and (not args.rtf) and (not args.xmlxsd) and (not args.man)):
681694
args.xml=True
682695
if (args.updateref is not None) and (args.ids is None) and (args.all is None):
683696
parser.error('--updateref requires either --id or --all')

0 commit comments

Comments
 (0)