Skip to content

Possibility to, locally, generate man output files from tests #10637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions testing/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ def prepare_test(self):
print('RTF_OUTPUT=%s/rtf' % self.test_out, file=f)
else:
print('GENERATE_RTF=NO', file=f)
if (self.args.man):
print('GENERATE_MAN=YES', file=f)
print('MAN_LINKS=YES', file=f)
print('MAN_OUTPUT=%s/man' % self.test_out, file=f)
else:
print('GENERATE_MAN=NO', file=f)
if (self.args.docbook):
print('GENERATE_DOCBOOK=YES', file=f)
print('DOCBOOK_OUTPUT=%s/docbook' % self.test_out, file=f)
Expand Down Expand Up @@ -285,6 +291,7 @@ def perform_test(self,testmgr):
failed_latex=False
failed_docbook=False
failed_rtf=False
failed_man=False
failed_xmlxsd=False
msg = ()
# look for files to check against the reference
Expand Down Expand Up @@ -422,6 +429,9 @@ def perform_test(self,testmgr):
msg += (msg1,)
failed_rtf=True

if (self.args.man):
pass

if (self.args.docbook):
docbook_output='%s/docbook' % self.test_out
if (sys.platform == 'win32'):
Expand Down Expand Up @@ -528,7 +538,7 @@ def perform_test(self,testmgr):
if failed_warn:
msg += (warnings,)

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

Expand Down Expand Up @@ -648,6 +658,8 @@ def main():
'create docbook output and check with xmllint',action="store_true")
parser.add_argument('--xhtml',help=
'create xhtml output and check with xmllint',action="store_true")
parser.add_argument('--man',help=
'create man output',action="store_true")
parser.add_argument('--qhp',help=
'create qhp output and check with xmllint',action="store_true")
parser.add_argument('--xmlxsd',help=
Expand All @@ -670,7 +682,7 @@ def main():
args = parser.parse_args(test_flags + sys.argv[1:])

# sanity check
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)):
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)):
args.xml=True
if (not args.updateref is None) and (args.ids is None) and (args.all is None):
parser.error('--updateref requires either --id or --all')
Expand Down