[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 10:38:51 CDT 2011


branch "review" has been updated
       via  7ff554c8a2572d2bf71adcfbd80c2f4a22dcf2fb (commit)
      from  d9172a147942a97b2ec3677a6658ba63c791e116 (commit)

Summary of changes:
 testsuite.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 7ff554c8a2572d2bf71adcfbd80c2f4a22dcf2fb
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 1 10:38:49 2011 -0500

    modified the print statements to use stderr thereby eliminating the bufferring and thus displaying properly in bamboo.

diff --git a/testsuite.py b/testsuite.py
index 4733de5..91f97d1 100755
--- a/testsuite.py
+++ b/testsuite.py
@@ -47,11 +47,11 @@ class __main__:
         for list in self.yamlData:
             for testCategory in list:
                 x, categoryElement = xml().addTestSuite(x, testCategory)
-                print "\n Starting '%s' tests . . \n ---------------------------------" % testCategory
+                print >> sys.stderr, "\n Starting '%s' tests . . \n ---------------------------------" % testCategory
             
                 for testData in list[testCategory]:
                     categoryElement, testElement = xml().addTestSuite(categoryElement, testData['name'])
-                    print ' |- Testcase "%s" ' % testData['name']
+                    print >> sys.stderr, ' |- Testcase "%s" ' % testData['name']
                     for subTestCase in testData['tests']:
                         for testName in subTestCase:
                             testElement, subTestElement = xml().addTestCase(testElement, testName)
@@ -72,7 +72,7 @@ class __main__:
                                         success = False
 
                                 if success == False:
-                                    print '   |- Test "' + testName + '" - FAILED!\n    \- ' + '\n'.join(errorMsgs)
+                                    print >> sys.stderr, '   |- Test "' + testName + '" - FAILED!\n    \- ' + '\n'.join(errorMsgs)
                                     subTestElement, errorMsgs = xml().addFailure(subTestElement, errorMsgs)
                                     break
 
@@ -103,17 +103,17 @@ class __main__:
                                             pass
 
                                 if runResults['success'] == False:
-                                    print '   |- Test "' + testName + '" - FAILED!\n    \- ' + runResults['msg']
+                                    print >> sys.stderr, '   |- Test "' + testName + '" - FAILED!\n    \- ' + runResults['msg']
                                     subTestElement, errorMsgs = xml().addFailure(subTestElement, ['%s' % runResults['msg']])
                                     break
                 
-                                print '   |- Test "' + testName + '" - PASSED!'
+                                print >> sys.stderr, '   |- Test "' + testName + '" - PASSED!'
                                 # setProperty(self, element, key, val): for xml results
                             else:
-                                print '   |- Test "' + testName + '" - FAILED!\n    \- No test data defined!'
+                                print >> sys.stderr, '   |- Test "' + testName + '" - FAILED!\n    \- No test data defined!'
                                 subTestElement, errorMsgs = xml().addFailure(subTestElement, ['No test data defined!'])
                                 break
-        print "\n\n" + xml().prettyXml(x)
+        print >> sys.stderr, "\n\n" + xml().prettyXml(x)
         return
 
 class plugins:

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list