nightly testing: handle runs without tests
When the preparation failed and no tests were run, no email with the HTML test report was sent. Fixing this at two places: - resultchecker.py always needs a "server" argument, even if it is empty - the compare style sheet depends on a testing section, so write at least an empty one
This commit is contained in:
parent
4bd8f98026
commit
be66091476
|
@ -44,6 +44,10 @@ def check (resultdir, serverlist,resulturi, srcdir, shellprefix, backenddir):
|
|||
indents,cont = step1(resultdir+"/output.txt",result,indents,resultdir,resulturi, shellprefix, srcdir)
|
||||
if (cont):
|
||||
step2(resultdir,result,servers,indents,srcdir,shellprefix,backenddir)
|
||||
else:
|
||||
# compare.xsl fails if there is no <client-test> element:
|
||||
# add an empty one
|
||||
result.write('''<client-test/>\n''')
|
||||
result.write('''</nightly-test>\n''')
|
||||
result.close()
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ class Context:
|
|||
#calculate the src dir where client-test can be located
|
||||
srcdir = os.path.join(self.tmpdir,"build/src")
|
||||
backenddir = os.path.join(self.tmpdir, "install/usr/lib/syncevolution/backends")
|
||||
self.runCommand("resultchecker.py " +self.resultdir+" "+",".join(run_servers)+" "+self.uri +" "+srcdir + " '" + options.shell + " " + options.testprefix +" '"+" '" +backenddir +"'");
|
||||
self.runCommand("resultchecker.py " +self.resultdir+" "+"'"+",".join(run_servers)+"'"+" "+self.uri +" "+srcdir + " '" + options.shell + " " + options.testprefix +" '"+" '" +backenddir +"'");
|
||||
# transform to html
|
||||
self.runCommand("xsltproc -o " + self.resultdir + "/cmp_result.xml --stringparam cmp_file " + self.lastresultdir +"/nightly.xml "+self.datadir +"/compare.xsl "+ self.resultdir+"/nightly.xml")
|
||||
self.runCommand("xsltproc -o " + self.resultdir + "/nightly.html --stringparam cmp_result_file " + self.resultdir + "/cmp_result.xml " + self.datadir +"/generate-html.xsl "+ self.resultdir+"/nightly.xml")
|
||||
|
|
Loading…
Reference in New Issue