Skip to content

Commit 1748919

Browse files
committed
Create possibility to have also man pages generated in test suite
Adding possibility for man pages to the test suite
1 parent b9ac9e4 commit 1748919

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
@@ -168,6 +168,12 @@ def prepare_test(self):
168168
print('DOCBOOK_OUTPUT=%s/docbook' % self.test_out, file=f)
169169
else:
170170
print('GENERATE_DOCBOOK=NO', file=f)
171+
if (self.args.man):
172+
print('GENERATE_MAN=YES', file=f)
173+
print('MAN_LINKS=YES', file=f)
174+
print('MAN_OUTPUT=%s/man' % self.test_out, file=f)
175+
else:
176+
print('GENERATE_MAN=NO', file=f)
171177
if (self.args.qhp):
172178
print('GENERATE_QHP=YES', file=f)
173179
if (self.args.xhtml or self.args.qhp):
@@ -290,6 +296,7 @@ def perform_test(self,testmgr):
290296
failed_docbook=False
291297
failed_rtf=False
292298
failed_xmlxsd=False
299+
failed_man=False
293300
msg = ()
294301
# look for files to check against the reference
295302
if self.args.xml or self.args.xmlxsd:
@@ -454,6 +461,10 @@ def perform_test(self,testmgr):
454461
elif not self.args.keep:
455462
shutil.rmtree(docbook_output,ignore_errors=True)
456463

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

535-
if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd:
546+
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:
536547
testmgr.ok(False,self.test_name,msg)
537548
return False
538549

@@ -658,6 +669,8 @@ def main():
658669
'create qhp output and check with xmllint',action="store_true")
659670
parser.add_argument('--xmlxsd',help=
660671
'create xml output and check with xmllint against xsd',action="store_true")
672+
parser.add_argument('--man',help=
673+
'create man output',action="store_true")
661674
parser.add_argument('--pdf',help='create LaTeX output and create pdf from it',
662675
action="store_true")
663676
parser.add_argument('--subdirs',help='use the configuration parameter CREATE_SUBDIRS=YES',
@@ -676,7 +689,7 @@ def main():
676689
args = parser.parse_args(test_flags + sys.argv[1:])
677690

678691
# sanity check
679-
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)):
692+
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)):
680693
args.xml=True
681694
if (not args.updateref is None) and (args.ids is None) and (args.all is None):
682695
parser.error('--updateref requires either --id or --all')

0 commit comments

Comments
 (0)