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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 13 16:29:49 CDT 2011


branch "master" has been updated
       via  d1ff50791eb59d889181c93d1cc71782fe8626c7 (commit)
      from  32c0e805faca0ef8637f9b6a610aec878f2e109a (commit)

Summary of changes:
 bamboo/bin/tests.py |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)


- Log -----------------------------------------------------------------
commit d1ff50791eb59d889181c93d1cc71782fe8626c7
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Apr 13 16:29:47 2011 -0500

    Instead of running 'make test' in the test directory, the build system now looks in the build/<component> directory.

diff --git a/bamboo/bin/tests.py b/bamboo/bin/tests.py
index d3ba27a..a5c4404 100644
--- a/bamboo/bin/tests.py
+++ b/bamboo/bin/tests.py
@@ -31,20 +31,12 @@ class test_asterisk_scf:
         self.__build()
         
         if self._unittests:
-            logger_names = {'logger/server':'logger_server','logger/client':'logger_client'}
-            if component == "logger":
-                for comp in logger_names:
-                    self.__unit_tests(comp)
-                    self.__write_results_xml(logger_names[comp])
-                    os.chdir("../../../..")
-                os.chdir("build/logger/server")
-            else:
-                self.__unit_tests(component)
-                self.__write_results_xml(component)
+            self.__unit_tests(component)
+            self.__write_results_xml(component)
             self.__convert_boost_to_junit()
 
     def __convert_boost_to_junit(self):
-        os.chdir("../..")
+        os.chdir("..")
         tree = os.walk(".")
         for root, dirs, files in tree:
             if len(files)>0:
@@ -60,11 +52,11 @@ class test_asterisk_scf:
         self.passed = 1
         self.did_run = True
         
-        if not os.path.exists("./build/%s/test" % component):
+        if not os.path.exists("./build/%s" % component):
             print "Unable to find the test directory for the '%s' component!" % component
             return
 
-        os.chdir("./build/%s/test" % component)
+        os.chdir("./build/%s" % component)
         start_time = time.time()
         self.passed = uni_make(None, None, 'test')
         self.total_time = time.time() - start_time
@@ -75,7 +67,7 @@ class test_asterisk_scf:
 
     def __write_results_xml(self, component): 
         try:
-            f = open("../../%s_master_unit_test_results.xml" % component, "w")
+            f = open("../%s_master_unit_test_results.xml" % component, "w")
         except IOError:
             print "Failed to open test results output file: "
             return
@@ -97,7 +89,7 @@ class test_asterisk_scf:
         f.close()
 
         try:
-            f = open("../../%s_master_unit_test_results.xml" % component, "r")
+            f = open("../%s_master_unit_test_results.xml" % component, "r")
         except IOError:
             print "Failed to open test results output file:"
         except:

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


-- 
asterisk-scf/release/testsuite.git



More information about the asterisk-scf-commits mailing list