Boost logo

Boost-Commit :

From: dave_at_[hidden]
Date: 2007-11-24 17:18:15


Author: dave
Date: 2007-11-24 17:18:14 EST (Sat, 24 Nov 2007)
New Revision: 41345
URL: http://svn.boost.org/trac/boost/changeset/41345

Log:
Delete create_bitten_report which is dead and just confusing things with create_bitten_reports around.

Fix a bug that was causing failed test output to be dropped.

Fix a "bug" that was causing bitten reports to overwrite bjam XML output.

Text files modified:
   branches/bitten/tools/regression/src/collect_and_upload_logs.py | 84 ----------------------------------------
   branches/bitten/tools/regression/src/regression.py | 10 ----
   branches/bitten/tools/regression/src/test_results.py | 3
   3 files changed, 3 insertions(+), 94 deletions(-)

Modified: branches/bitten/tools/regression/src/collect_and_upload_logs.py
==============================================================================
--- branches/bitten/tools/regression/src/collect_and_upload_logs.py (original)
+++ branches/bitten/tools/regression/src/collect_and_upload_logs.py 2007-11-24 17:18:14 EST (Sat, 24 Nov 2007)
@@ -89,90 +89,6 @@
     def send_host(self, connection, host):
         connection.putheader('Host',self.realhost)
     
-def create_bitten_report(
- input_dir
- ):
- __log__ = 1
- utils.log( 'Creating Bitten report from %s...' % input_dir )
-
- report = xml.dom.minidom.parseString(
-'''<?xml version="1.0" encoding="UTF-8"?>
-<report category="test" generator="http://svn.boost.org/svn/boost/trunk/tools/regression/src/collect_and_upload_logs.py">
-</report>
-''')
-
- def _collect_bitten_report_files_( unused, dir, names ):
- for file in names:
- if os.path.basename( file ) == 'test_log.xml':
- file_path = os.path.join(dir,file)
- utils.log( 'Creating Bitten report from "%s"' % file_path )
- log_xml = open(file_path).read().translate(ascii_only_table)
- os.unlink(file_path) # don't leave the file sitting around for
- # the next run to find.
-
- #~ utils.log( '--- XML:\n%s' % log_xml)
- #~ It seems possible to get an empty XML result file
- if log_xml == "": continue
- log_dom = xml.dom.minidom.parseString(log_xml)
-
- log_attrs = dict(log_dom.documentElement.attributes.items())
- toolset = log_dom.documentElement.getAttribute('toolset')
- for node in log_dom.documentElement.childNodes:
-
- if node.nodeType != xml.dom.Node.ELEMENT_NODE: continue
-
- test = report.documentElement.appendChild(report.createElement('test'))
- test.appendChild(
- # We'll get the real timing info from bjam once we
- # get this working.
- report.createElement('duration')
- ).appendChild(
- report.createTextNode('0.0'))
-
- test.appendChild(
- report.createElement('status')
- ).appendChild(
- report.createTextNode(
- node.attributes['result'].firstChild.wholeText == 'succeed'
- and 'success' or 'failure'
- ))
-
- test.appendChild(
- report.createElement('fixture')
- ).appendChild(
- report.createTextNode(
- 'boost.%s.%s.%s (%s)' % (
- log_attrs['library'],
- log_attrs['test-name'],
- node.localName,
- toolset
- )))
-
- test.appendChild(
- report.createElement('name')
- ).appendChild(
- report.createTextNode(
- node.localName
- ))
-
- test.appendChild(
- report.createElement('file')
- ).appendChild(
- report.createTextNode(
- log_attrs['test-program']
- ))
-
- test.appendChild(
- report.createElement('stdout')
- ).appendChild(
- report.createTextNode(
- node.firstChild.wholeText
- ))
-
- os.path.walk( input_dir, _collect_bitten_report_files_, None )
-
- return report
-
 def indent(elem, level=0):
     i = "\n" + level*" "
     if len(elem):

Modified: branches/bitten/tools/regression/src/regression.py
==============================================================================
--- branches/bitten/tools/regression/src/regression.py (original)
+++ branches/bitten/tools/regression/src/regression.py 2007-11-24 17:18:14 EST (Sat, 24 Nov 2007)
@@ -164,7 +164,7 @@
             }
 
         if self.library:
- out_xml = os.path.join( *(self.library + '.xml').split('/') )
+ out_xml = os.path.join( *(self.library + '-x.xml').split('/') )
         else:
             out_xml = 'test_results.xml'
             
@@ -324,14 +324,6 @@
         self.import_utils()
         from collect_and_upload_logs import create_bitten_reports
 
- if self.library:
- xml_root = os.path.join( self.regression_results, 'boost',
- 'bin.v2', 'libs', self.library
- )
- else:
- xml_root = os.path.join( self.regression_results, 'boost',
- 'bin.v2' )
-
         report = create_bitten_reports(self.boost_root, self.out_xml)
 
         dir = os.path.split(self.bitten_report)[0]

Modified: branches/bitten/tools/regression/src/test_results.py
==============================================================================
--- branches/bitten/tools/regression/src/test_results.py (original)
+++ branches/bitten/tools/regression/src/test_results.py 2007-11-24 17:18:14 EST (Sat, 24 Nov 2007)
@@ -80,6 +80,7 @@
                 target = elem.find('jam-target')
                 command = elem.find('command')
                 output = elem.find('output')
+
                 if target is None:
                     continue
 
@@ -89,7 +90,7 @@
 
                 name = self._as_absolute_path(target.text)
                 self.results[name] = (status == '0', command.text,
- output and output.text or '', properties)
+ output is not None and output.text or '', properties)
                 elem.clear()
 
     def _follow_dependencies(self, target):


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk