Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 from lxml import etree
00016 import StringIO
00017 import sys
00018
00019 TAGfile = open(sys.argv[1]+"/Testing/TAG", 'r')
00020 dirname = TAGfile.readline().strip()
00021
00022 xmlfile = open(sys.argv[1]+"/Testing/"+dirname+"/Test.xml", 'r')
00023 xslfile = open(sys.path[0] + "/ctest_to_junit.xsl", 'r')
00024
00025 xmlcontent = xmlfile.read()
00026 xslcontent = xslfile.read()
00027
00028 xmldoc = etree.parse(StringIO.StringIO(xmlcontent))
00029 xslt_root = etree.XML(xslcontent)
00030 transform = etree.XSLT(xslt_root)
00031
00032 result_tree = transform(xmldoc)
00033 result_tree.write(sys.argv[1]+"/Testing/"+dirname+"/jUnit.xml")