@@ -161,7 +161,9 @@ def prepare_test(self):
161
161
print ('DOCBOOK_OUTPUT=%s/docbook' % self .test_out , file = f )
162
162
else :
163
163
print ('GENERATE_DOCBOOK=NO' , file = f )
164
- if (self .args .xhtml ):
164
+ if (self .args .qhp ):
165
+ print ('GENERATE_QHP=YES' , file = f )
166
+ if (self .args .xhtml or self .args .qhp ):
165
167
print ('GENERATE_HTML=YES' , file = f )
166
168
# HTML_OUTPUT can also have been set locally
167
169
print ('HTML_OUTPUT=%s/html' % self .test_out , file = f )
@@ -275,6 +277,7 @@ def perform_test(self,testmgr):
275
277
276
278
failed_xml = False
277
279
failed_html = False
280
+ failed_qhp = False
278
281
failed_latex = False
279
282
failed_docbook = False
280
283
failed_rtf = False
@@ -443,7 +446,7 @@ def perform_test(self,testmgr):
443
446
elif not self .args .keep :
444
447
shutil .rmtree (docbook_output ,ignore_errors = True )
445
448
446
- if (self .args .xhtml ):
449
+ if (self .args .xhtml or self . args . qhp ):
447
450
html_output = '%s/html' % self .test_out
448
451
if (sys .platform == 'win32' ):
449
452
redirx = ' 2> %s/temp >nul:' % html_output
@@ -462,10 +465,23 @@ def perform_test(self,testmgr):
462
465
xmllint_out = self .cleanup_xmllint (xmllint_out )
463
466
if xmllint_out :
464
467
xmllint_out = clean_header (xmllint_out )
465
- if xmllint_out :
466
- msg += (xmllint_out ,)
467
- failed_html = True
468
- elif not self .args .keep :
468
+ if xmllint_out :
469
+ msg += (xmllint_out ,)
470
+ failed_html = True
471
+
472
+ failed_qhp = False
473
+ if not failed_html :
474
+ check_file = "%s/index.qhp" % (html_output )
475
+ exe_string = '%s --noout %s' % (self .args .xmllint ,check_file )
476
+ exe_string1 = exe_string
477
+ exe_string += ' %s' % (redirx )
478
+ exe_string += ' %s more "%s/temp"' % (separ ,html_output )
479
+ xmllint_out = xpopen (exe_string ,exe_string1 ,getStderr = True )
480
+ xmllint_out = self .cleanup_xmllint (xmllint_out )
481
+ if xmllint_out :
482
+ msg += (xmllint_out ,)
483
+ failed_qhp = True
484
+ if not failed_html and not failed_qhp and not self .args .keep :
469
485
shutil .rmtree (html_output ,ignore_errors = True )
470
486
if (self .args .pdf ):
471
487
failed_latex = False
@@ -508,7 +524,7 @@ def perform_test(self,testmgr):
508
524
if failed_warn :
509
525
msg += (warnings ,)
510
526
511
- if failed_warn or failed_xml or failed_html or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd :
527
+ if failed_warn or failed_xml or failed_html or failed_qhp or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd :
512
528
testmgr .ok (False ,self .test_name ,msg )
513
529
return False
514
530
@@ -534,7 +550,7 @@ def __init__(self,args,tests):
534
550
self .num_tests = len (tests )
535
551
self .count = 1
536
552
self .passed = 0
537
- if self .args .xhtml :
553
+ if ( self .args .xhtml or self . args . qhp ) :
538
554
self .prepare_dtd ()
539
555
print ('1..%d' % self .num_tests )
540
556
@@ -573,7 +589,7 @@ def perform_tests(self):
573
589
passed = p .map (do_generation_work , dl )
574
590
self .passed = sum (passed )
575
591
res = self .result ()
576
- if self .args .xhtml and self .args .inputdir != '.' and not res and not self .args .keep :
592
+ if ( self .args .xhtml or self . args . qhp ) and self .args .inputdir != '.' and not res and not self .args .keep :
577
593
shutil .rmtree ("dtd" ,ignore_errors = True )
578
594
return 0 if self .args .updateref else res
579
595
@@ -627,6 +643,8 @@ def main():
627
643
'create docbook output and check with xmllint' ,action = "store_true" )
628
644
parser .add_argument ('--xhtml' ,help =
629
645
'create xhtml output and check with xmllint' ,action = "store_true" )
646
+ parser .add_argument ('--qhp' ,help =
647
+ 'create qhp output and check with xmllint' ,action = "store_true" )
630
648
parser .add_argument ('--xmlxsd' ,help =
631
649
'create xml output and check with xmllint against xsd' ,action = "store_true" )
632
650
parser .add_argument ('--pdf' ,help = 'create LaTeX output and create pdf from it' ,
@@ -647,7 +665,7 @@ def main():
647
665
args = parser .parse_args (test_flags + sys .argv [1 :])
648
666
649
667
# sanity check
650
- if (not args .xml ) and (not args .pdf ) and (not args .xhtml ) and (not args .docbook and (not args .rtf ) and (not args .xmlxsd )):
668
+ 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 )):
651
669
args .xml = True
652
670
if (not args .updateref is None ) and (args .ids is None ) and (args .all is None ):
653
671
parser .error ('--updateref requires either --id or --all' )
0 commit comments