Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-07-03 16:02:25


Author: troy
Date: 2008-07-03 16:02:24 EDT (Thu, 03 Jul 2008)
New Revision: 47057
URL: http://svn.boost.org/trac/boost/changeset/47057

Log:

Factor out classification of build/test steps into pass/fail/warn/timeout/not_executed/unexpected_pass

Added:
   branches/CMake/release/tools/build/CMake/classify.py.in (contents, props changed)
Text files modified:
   branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake | 2 +-
   branches/CMake/release/tools/build/CMake/marshal.py.in | 6 +++++-
   2 files changed, 6 insertions(+), 2 deletions(-)

Modified: branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake
==============================================================================
--- branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake (original)
+++ branches/CMake/release/tools/build/CMake/BoostBuildSlave.cmake 2008-07-03 16:02:24 EDT (Thu, 03 Jul 2008)
@@ -45,7 +45,7 @@
 #
 # the programs that do the dirty work.
 #
-foreach(PYFILE boost_build_slave passthru marshal start finish info post)
+foreach(PYFILE boost_build_slave passthru marshal start finish info post classify)
   configure_file(tools/build/CMake/${PYFILE}.py.in
     ${BOOST_BUILD_SLAVE_PYTHONPATH}/${PYFILE}.py
     @ONLY

Added: branches/CMake/release/tools/build/CMake/classify.py.in
==============================================================================
--- (empty file)
+++ branches/CMake/release/tools/build/CMake/classify.py.in 2008-07-03 16:02:24 EDT (Thu, 03 Jul 2008)
@@ -0,0 +1,35 @@
+#
+# Classifies pass/fail/warn for the sake of traash
+#
+
+toolset = '@BOOST_TOOLSET@'
+
+# 'cxx_compile_object'
+# 'run'
+# 'link_executable'
+# 'create_shared_library'
+# 'create_static_library'
+# 'compile-fail'
+
+def classify(step):
+ print "step=", step
+ if 'errno' in step:
+ if step['errno'] == 666:
+ step['status'] = 'timeout'
+ else:
+ step['status'] = 'not_executed'
+ return
+
+ if step['returncode'] != 0 and not step['expect_fail']:
+ step['status'] = 'fail'
+ return
+
+ if step['returncode'] == '0' and step['expect_fail']:
+ step['status'] = 'unexpected_pass'
+ return
+
+ if len(step['stderr']) != 0 and not step['stderr'].isspace():
+ step['status'] = 'warn'
+ return
+
+ step['status'] = 'pass'

Modified: branches/CMake/release/tools/build/CMake/marshal.py.in
==============================================================================
--- branches/CMake/release/tools/build/CMake/marshal.py.in (original)
+++ branches/CMake/release/tools/build/CMake/marshal.py.in 2008-07-03 16:02:24 EDT (Thu, 03 Jul 2008)
@@ -18,6 +18,7 @@
 import datetime, time, signal
 from subprocess import Popen, PIPE
 from kill_subprocess import kill_subprocess
+from classify import classify
 
 log = os.path.join(sys.argv[1], "Log.marshal")
 op = sys.argv[2]
@@ -40,7 +41,7 @@
     def run(self):
         try:
             self.proc = Popen(argv, stdout=PIPE, stderr=PIPE)
- (self.stderr, self.stdout) = self.proc.communicate()
+ (self.stdout, self.stderr) = self.proc.communicate()
         except EnvironmentError, e:
             self.ex = e
 
@@ -86,6 +87,9 @@
                'target' : target,
                'cmdline' : argv })
 
+classify(result)
+print "post classification: result=", result
+
 f = open(log, "ab", 0)
 marshal.dump(result, f)
 f.close()


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