[asterisk-scf-commits] asterisk-scf/release/bamboo.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jan 4 15:40:14 CST 2012


branch "master" has been updated
       via  430a68b6933d6c1a5e21fbe08da6cfa2774cba25 (commit)
      from  a8ca8a0f609714c4ec14b46b1b7babd689e4dbac (commit)

Summary of changes:
 bin/tests.py |   51 ++++++++++++++++++++++++++++++---------------------
 1 files changed, 30 insertions(+), 21 deletions(-)


- Log -----------------------------------------------------------------
commit 430a68b6933d6c1a5e21fbe08da6cfa2774cba25
Author: Darren Sessions <dsessions at digium.com>
Date:   Tue Jan 3 12:59:59 2012 -0600

    Added additional debug information for Linux hosts that outputs a 'uname -a', make version, cmake version, and java version. Modified print statements to print to stderr as well so output is at the beginning of the log instead of at the end of the log file.

diff --git a/bin/tests.py b/bin/tests.py
index 173a6e0..294c008 100644
--- a/bin/tests.py
+++ b/bin/tests.py
@@ -17,6 +17,7 @@ import os
 import re
 import sys
 import time
+import commands
 import platform
 import optparse
 import subprocess
@@ -53,7 +54,7 @@ class test_asterisk_scf:
         self.did_run = True
         
         if not os.path.exists("./build/%s" % component):
-            print "Unable to find the test directory for the '%s' component!" % component
+            print >> sys.stderr, "Unable to find the test directory for the '%s' component!" % component
             return
 
         os.chdir("./build/%s" % component)
@@ -69,7 +70,7 @@ class test_asterisk_scf:
         try:
             f = open("../%s_master_unit_test_results.xml" % component, "w")
         except IOError:
-            print "Failed to open test results output file: "
+            print >> sys.stderr, "Failed to open test results output file: "
             return
         except:
             print "Unexpected error: %s" % sys.exc_info()[0]
@@ -91,11 +92,11 @@ class test_asterisk_scf:
         try:
             f = open("../%s_master_unit_test_results.xml" % component, "r")
         except IOError:
-            print "Failed to open test results output file:"
+            print >> sys.stderr, "Failed to open test results output file:"
         except:
-            print "Unexpected error: %s" % sys.exc_info()[0]
+            print >> sys.stderr, "Unexpected error: %s" % sys.exc_info()[0]
         else:
-            print f.read()
+            print >> sys.stderr, f.read()
             f.close()
 
     def __build(self):
@@ -111,11 +112,11 @@ class test_asterisk_scf:
         else:
             cloned_rev = readinfile("%s/.git/refs/heads/master" % self._component).rstrip('\n')
 
-        print "\n\nTest build initiated for: %s" % self._component
-        print "-----------------\nBamboo revision = %s\nCloned revision = %s\n-----------------\n" % (crev, cloned_rev)
+        print >> sys.stderr, "\n\nTest build initiated for: %s" % self._component
+        print >> sys.stderr, "-----------------\nBamboo revision = %s\nCloned revision = %s\n-----------------\n" % (crev, cloned_rev)
     
         if crev != cloned_rev:
-            print "Reverting to %s" % crev
+            print >> sys.stderr, "Reverting to %s" % crev
             if self._component != "gitall":
                 os.chdir("./%s" % self._component)
             os.system("git checkout %s" % crev)
@@ -132,8 +133,6 @@ class test_asterisk_scf:
             system_call(["%s" % self._msbuild_path, "pjmedia_audiodev.vcxproj"])
             os.chdir("../../third_party/build/srtp")
             system_call(["%s" % self._msbuild_path, "libsrtp.vcxproj"])
-            os.chdir("../resample")
-            system_call(["%s" % self._msbuild_path, "libresample_dll.vcxproj"])
             os.chdir("../../../pjnath/build")
             system_call(["%s" % self._msbuild_path, "pjnath.vcxproj"])
             os.chdir("../../pjsip/build")
@@ -175,13 +174,13 @@ def which(app):
     return 
 
 def test_ice():
-    print "\n\nBuilding Ice\n"
+    print >> sys.stderr, "\n\nBuilding Ice\n"
     os.chdir("./cpp")
     uni_make(1, 1, 'install')
     sys.exit(0)
 
 def test_slice_plugins():
-    print "\n\nBuilding Slice Plugins\n"
+    print >> sys.stderr, "\n\nBuilding Slice Plugins\n"
     os.system("cmake .")
     uni_make(None, None, 'install')
     sys.exit(0)
@@ -224,7 +223,7 @@ def errorout(msg):
     dash = ""
     while len(dash) < len(msg):
         dash = dash + "!"
-    print dash + "\n" + msg + "\n" + dash + "\n"
+    print >> sys.stderr, dash + "\n" + msg + "\n" + dash + "\n"
     sys.exit(1)
 
 def update_build_env():
@@ -266,15 +265,25 @@ def main(argv=None):
         make = "/usr/bin/make"
         rmdircmd = "rm -rf"
 
-    print "-------------------------------------------------------------------------\n"
-    print "-------------------------------------------------------------------------\n\n"
-    print "Running on %s %s\n" % (plat, arch) 
-    print "\n"
+    print >> sys.stderr, '\n' + '='*80 + '\n' + '='*80 + '\n'
+    print >> sys.stderr, "Running on %s %s\n" % (plat, arch) 
+
+    print >> sys.stderr, '-'*80 + "\nHost Software Version Info\n" + '-'*80
+    if plat == "Windows":
+        check = []
+    elif plat == "SunOS":
+        check = []
+    else:
+	check = ['uname -a', 'java -version', 'gcc --version', 'cmake --version', 'make --version']
+    for wtc in check:
+    	print >> sys.stderr, "%s" % commands.getoutput(wtc) + '\n'
+
+    print >> sys.stderr, '-'*80 + "\nHost Environment\n" + '-'*80   
     for param in os.environ.keys():
-        print "%20s %s" % (param, os.environ[param])
-    print "\n"
-    print "-------------------------------------------------------------------------\n"
-    print "-------------------------------------------------------------------------\n\n"
+        print >> sys.stderr, "%20s %s" % (param, os.environ[param])
+    print >> sys.stderr, '\n'
+
+    print >> sys.stderr, '='*80 + '\n' + '='*80 + '\n\n'
 
     if args[1] == "ice":
         test_ice()

-----------------------------------------------------------------------


-- 
asterisk-scf/release/bamboo.git



More information about the asterisk-scf-commits mailing list