Ejemplo n.º 1
0
    def do(self,
           modules=None,
           overwritten=False,
           overload=False,
           initdb=False):
        """Read yaml files, download, unzip, convert and load"""
        list = self.__loadYaml(modules)
        self.__convert(list, overwritten)
        #Get info of each platform. Foreach, start it and do:
        for name in self.testdbs_conf:
            db_manager = dbManager.dbManager(self.testdbs_conf[name])
            db_manager.start()

            if initdb is True:
                db_manager.initDB()

            self.__load(db_manager, name.lower(), list, overload)
            db_manager.stop()
            print name
            total_time = 0.0
            for id, attris in self.__log.items():
                info = ''
                for key, value in attris.items():
                    if key in ('load', 'convert', 'download'):
                        total_time += value
                    info += key + ':' + str(value) + '\t'
                print id + '\t' + info
            print "TOTAL TIME SPENT:", total_time
Ejemplo n.º 2
0
 def __init__(self, cases, cur_dbconf, platform):
     """
     param cases: cases to execute.
     param cur_dbconf: current test DB configuration.
     """
     self.cases = cases
     self.init_sql = "drop schema if exists madlibtestresult cascade; create schema madlibtestresult;"
     self.version = None
     self.cur_dbconf = cur_dbconf
     self.platform = platform
     self.dbManager = dbManager.dbManager(cur_dbconf)
     self.psql_append = self.dbManager.getDBsqlArgs()
Ejemplo n.º 3
0
 def __init__(self, cases, cur_dbconf, platform):
     """
     param cases: cases to execute.
     param cur_dbconf: current test DB configuration.
     """
     self.cases     =  cases
     self.init_sql  = "drop schema if exists madlibtestresult cascade; create schema madlibtestresult;"
     self.version = None
     self.cur_dbconf = cur_dbconf 
     self.platform = platform
     self.dbManager = dbManager.dbManager(cur_dbconf)
     self.psql_append = self.dbManager.getDBsqlArgs()
Ejemplo n.º 4
0
    def do(self, modules=None, overwritten=False, overload=False, initdb=False):
        """Read yaml files, download, unzip, convert and load"""
        yaml_list = self.__loadYaml(modules)
        self.__convert(yaml_list, overwritten)
        # Get info of each platform. Foreach, start it and do:
        for name in self.testdbs_conf:
            db_manager = dbManager.dbManager(self.testdbs_conf[name])
            db_manager.start()

            if initdb is True:
                db_manager.initDB()

            self.__load(db_manager, name.lower(), yaml_list, overload)
            db_manager.stop()
            print name
            total_time = 0.0
            for id, attris in self.__log.items():
                info = ""
                for key, value in attris.items():
                    if key in ("load", "convert", "download"):
                        total_time += value
                    info += key + ":" + str(value) + "\t"
                print id + "\t" + info
            print "TOTAL TIME SPENT:", total_time