[asterisk-scf-commits] asterisk-scf/integration/testsuite.git branch "review" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jun 1 20:40:27 CDT 2011


branch "review" has been updated
       via  2f1e8e965ef0d6b171abb4d6a8c2d8936d6ac6c6 (commit)
       via  d978bfb45fb4dbb636b9d8e92184f6e382497bd0 (commit)
      from  7762cd893d2c08bfffecc207e83f050d98fdac03 (commit)

Summary of changes:
 lib/python/TestSuite.py |   11 ++++++++++-
 testsuite.py            |   10 +++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 2f1e8e965ef0d6b171abb4d6a8c2d8936d6ac6c6
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 1 20:40:23 2011 -0500

    debugging the signal being sent by bamboo . .

diff --git a/testsuite.py b/testsuite.py
index 2259e45..54f02d8 100755
--- a/testsuite.py
+++ b/testsuite.py
@@ -100,7 +100,7 @@ class __main__:
                                             break
                                     if runResults['success'] == False:
                                         print runResults
-                                        runResults['msg'] = '%s: %s' % (plugin, runResults['msg'])
+                                        runResults['msg'] = "'%s' plugin: %s" % (plugin, runResults['msg'])
                                         break
 
                                 ''' shutdown if 'restart_persistant_plugins_between_tests' is true or not specified '''
@@ -235,8 +235,12 @@ class cleanup:
         return {'success':True}
 
 def sigHandler(signum, frame):
-    print >> sys.stderr, 'Signal handler called with signal %s' % signum
-    cleanup()
+    if signum in [1,2,3,15]:
+        print  >> sys.stderr, 'Caught signal %s, exiting.' %(str(signum))
+        cleanup()
+        sys.exit()
+    else:
+        print  >> sys.stderr, 'Caught signal %s, ignoring.' %(str(signum))
 
 def sigSetup():
     uncatchable = ['SIG_DFL','SIGSTOP','SIGKILL']

commit d978bfb45fb4dbb636b9d8e92184f6e382497bd0
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 1 20:28:49 2011 -0500

    some tweaks and debugging for bamboo support

diff --git a/lib/python/TestSuite.py b/lib/python/TestSuite.py
index 8f4c173..b068b98 100644
--- a/lib/python/TestSuite.py
+++ b/lib/python/TestSuite.py
@@ -33,7 +33,16 @@ class utils():
             return False
 
     def installFromRemote(self, cwd, fn, fd, installPath):
-        w = open('%s/tmp/%s' % (cwd, fn), "wb")
+        print >> sys.stderr, 'Im here 1'
+        try:
+            print >> sys.stderr, 'Im here 2'
+            w = open('%s/tmp/%s' % (cwd, fn), "wb")
+        except IOError:
+            print >> sys.stderr, 'Im here 3'
+            return {'success':False,'msg':'Failed to open temp file: %s' % fn}
+        except:
+            print >> sys.stderr, 'Im here 4'
+            return {'success':False,'msg':'Unexpected error: %s' % sys.exc_info()[0]}
         w.write(fd.data)
         w.close()
         installPath = installPath.replace('!!TMP!!', '%s/tmp' % cwd)

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list