summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-21 11:24:12 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-21 11:24:12 (GMT)
commitfba818d629d2c706f4058d4d2e846b77040a98b5 (patch)
treee3970ff26bfe57978d790c78b1009e74cb2d1735
parent398190cff55e8451d3f04ba8960f3a068191bc79 (diff)
parent3bde698eff78691909dd7265adb3aaf55d5c28aa (diff)
downloadDoxygen-fba818d629d2c706f4058d4d2e846b77040a98b5.zip
Doxygen-fba818d629d2c706f4058d4d2e846b77040a98b5.tar.gz
Doxygen-fba818d629d2c706f4058d4d2e846b77040a98b5.tar.bz2
Merge branch 'master' of github.com:doxygen/doxygen
-rw-r--r--src/htmldocvisitor.cpp2
-rw-r--r--templates/xml/compound.xsd1
-rwxr-xr-xtesting/runtests.py54
3 files changed, 40 insertions, 17 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 3dec509..e1466da 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -1725,7 +1725,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
if (typeSVG)
{
- m_t << "<object type=\"image/svg+xml\" data=\"" << src
+ m_t << "<object type=\"image/svg+xml\" data=\"" << convertToHtml(src)
<< "\"" << sizeAttribs << attrs;
if (inlineImage)
{
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd
index 7769c70..954141d 100644
--- a/templates/xml/compound.xsd
+++ b/templates/xml/compound.xsd
@@ -414,6 +414,7 @@
<xsd:element name="underline" type="docMarkupType" />
<xsd:element name="emphasis" type="docMarkupType" />
<xsd:element name="computeroutput" type="docMarkupType" />
+ <xsd:element name="ins" type="docMarkupType" />
<xsd:element name="subscript" type="docMarkupType" />
<xsd:element name="superscript" type="docMarkupType" />
<xsd:element name="center" type="docMarkupType" />
diff --git a/testing/runtests.py b/testing/runtests.py
index 3e099ee..a4118b8 100755
--- a/testing/runtests.py
+++ b/testing/runtests.py
@@ -18,7 +18,7 @@ def xopen(fname, mode='r', encoding='utf-8'):
else:
return open(fname, mode=mode, encoding=encoding) # Python 3 with encoding
-def xpopen(cmd, encoding='utf-8-sig'):
+def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False):
'''Unified file pipe opening for Python 2 an Python 3.
Python 2 does not have the encoding argument. Python 3 has one. and
@@ -27,9 +27,12 @@ def xpopen(cmd, encoding='utf-8-sig'):
if sys.version_info[0] == 2:
return os.popen(cmd).read() # Python 2 without encoding
else:
- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
- proc.wait
- return proc.stdout.read()
+ if (getStderr):
+ proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding
+ return proc.stderr
+ else:
+ proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
+ return proc.stdout.read()
class Tester:
def __init__(self,args,test):
@@ -139,6 +142,7 @@ class Tester:
print('HTML_FILE_EXTENSION=.xhtml', file=f)
if (self.args.pdf):
print('GENERATE_LATEX=YES', file=f)
+ print('LATEX_BATCHMODE=YES', file=f)
print('LATEX_OUTPUT=%s/latex' % self.test_out, file=f)
if self.args.subdirs:
print('CREATE_SUBDIRS=YES', file=f)
@@ -261,10 +265,12 @@ class Tester:
index_xsd.append(glob.glob('%s/index.xsd' % (xmlxsd_output)))
index_xsd.append(glob.glob('%s/*/*/index.xsd' % (xmlxsd_output)))
index_xsd = ' '.join(list(itertools.chain.from_iterable(index_xsd))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --noout --schema %s %s %s' % (self.args.xmllint,index_xsd,index_xml,redirx)
+ exe_string = '%s --noout --schema %s %s' % (self.args.xmllint,index_xsd,index_xml)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,xmlxsd_output)
- xmllint_out = xpopen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
if xmllint_out:
xmllint_out = re.sub(r'.*validates','',xmllint_out).rstrip('\n')
else:
@@ -285,10 +291,12 @@ class Tester:
compound_xsd.append(glob.glob('%s/compound.xsd' % (xmlxsd_output)))
compound_xsd.append(glob.glob('%s/*/*/compound.xsd' % (xmlxsd_output)))
compound_xsd = ' '.join(list(itertools.chain.from_iterable(compound_xsd))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --noout --schema %s %s %s' % (self.args.xmllint,compound_xsd,compound_xml,redirx)
+ exe_string = '%s --noout --schema %s %s' % (self.args.xmllint,compound_xsd,compound_xml)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,xmlxsd_output)
- xmllint_out = xpopen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
if xmllint_out:
xmllint_out = re.sub(r'.*validates','',xmllint_out).rstrip('\n')
else:
@@ -318,11 +326,13 @@ class Tester:
tests.append(glob.glob('%s/*.xml' % (docbook_output)))
tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output)))
tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --nonet --postvalid %s %s' % (self.args.xmllint,tests,redirx)
+ exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,docbook_output)
failed_docbook=False
- xmllint_out = xpopen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
xmllint_out = self.cleanup_xmllint_docbook(xmllint_out)
if xmllint_out:
msg += (xmllint_out,)
@@ -336,10 +346,12 @@ class Tester:
redirx=' 2> %s/temp >nul:'%html_output
else:
redirx='2>%s/temp >/dev/null'%html_output
- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml %s %s ' % (self.args.xmllint,html_output,redirx,separ)
- exe_string += 'more "%s/temp"' % (html_output)
+ exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output)
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirx)
+ exe_string += ' %s more "%s/temp"' % (separ,html_output)
failed_html=False
- xmllint_out = xpopen(exe_string).read()
+ xmllint_out = xpopen(exe_string,exe_string1,getStderr=True)
xmllint_out = self.cleanup_xmllint(xmllint_out)
if xmllint_out:
msg += (xmllint_out,)
@@ -351,14 +363,24 @@ class Tester:
latex_output='%s/latex' % self.test_out
if (sys.platform == 'win32'):
redirl='>nul: 2>temp'
+ mk='make.bat'
else:
redirl='>/dev/null 2>temp'
- exe_string = 'cd %s %s echo "q" | make %s %s' % (latex_output,separ,redirl,separ)
- exe_string += 'more temp'
- latex_out = xpopen(exe_string).read()
+ mk='make'
+ cur_directory = os.getcwd()
+ os.chdir(latex_output)
+ exe_string = mk
+ exe_string1 = exe_string
+ exe_string += ' %s' % (redirl)
+ exe_string += ' %s more temp' % (separ)
+ latex_out = xpopen(exe_string,exe_string1,getStderr=True)
+ os.chdir(cur_directory);
if latex_out.find("Error")!=-1:
msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
failed_html=True
+ elif xopen(latex_output + "/refman.log",'r').read().find("Error")!= -1:
+ msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
+ failed_html=True
elif xopen(latex_output + "/refman.log",'r').read().find("Emergency stop")!= -1:
msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
failed_html=True