Example #1
0
    def process_tree_type(self, tree_type, variables):
        """Import the appropriate module depending on the type of tree
           we are testing. 

           Drizzle is the only supported type currently

        """

        if self.verbose:
            self.logging.verbose("Processing source tree under test...")
        if tree_type == 'drizzle':
            # base_case
            from lib.sys_mgmt.codeTree import drizzleTree
            test_tree = drizzleTree(variables,self)
            return test_tree
        else:
            self.logging.error("Tree_type: %s not supported yet" %(tree_type))
            sys.exit(1)        
    def process_tree_type(self, tree_type, variables):
        """Import the appropriate module depending on the type of tree
           we are testing. 

           Drizzle is the only supported type currently

        """

        if self.verbose:
            self.logging.verbose("Processing source tree under test...")
        if tree_type == 'drizzle':
            # base_case
            from lib.sys_mgmt.codeTree import drizzleTree
            test_tree = drizzleTree(variables, self)
            return test_tree
        else:
            self.logging.error("Tree_type: %s not supported yet" % (tree_type))
            sys.exit(1)
Example #3
0
    def process_codeTree(self, basedir, variables, code_type=None):
        """Import the appropriate module depending on the type of tree
           we are testing. 

           Drizzle is the only supported type currently

        """

        self.logging.verbose("Processing code rooted at basedir: %s..." %
                             (basedir))
        # We comment out / remove the old get_code_type method
        # as the expectation is that the type will be passed as part of the
        # basedir string / will be the default type (which will be configurable)

        #code_type = self.get_code_type(basedir)
        if basedir.find(self.type_delimiter) != -1:
            basedir, code_type = basedir.split(self.type_delimiter)
        elif code_type:
            code_type = code_type
        else:
            code_type = variables['defaultservertype']
        if code_type == 'drizzle':
            # base_case
            from lib.sys_mgmt.codeTree import drizzleTree
            test_tree = drizzleTree(basedir, variables, self.system_manager)
            return code_type, test_tree
        elif code_type == 'mysql':
            from lib.sys_mgmt.codeTree import mysqlTree
            test_tree = mysqlTree(basedir, variables, self.system_manager)
            return code_type, test_tree
        elif code_type == 'galera':
            from lib.sys_mgmt.codeTree import galeraTree
            test_tree = galeraTree(basedir, variables, self.system_manager)
            return code_type, test_tree
        elif code_type == 'percona':
            from lib.sys_mgmt.codeTree import perconaTree
            test_tree = perconaTree(basedir, variables, self.system_manager)
            return code_type, test_tree
        else:
            self.logging.error("Tree_type: %s not supported yet" % (tree_type))
            sys.exit(1)
Example #4
0
    def process_codeTree(self, basedir, variables, code_type=None):
        """Import the appropriate module depending on the type of tree
           we are testing. 

           Drizzle is the only supported type currently

        """

        self.logging.verbose("Processing code rooted at basedir: %s..." %(basedir))
        # We comment out / remove the old get_code_type method
        # as the expectation is that the type will be passed as part of the 
        # basedir string / will be the default type (which will be configurable)

        #code_type = self.get_code_type(basedir)
        if basedir.find(self.type_delimiter) != -1:
            basedir, code_type = basedir.split(self.type_delimiter)
        elif code_type:
            code_type = code_type
        else:
            code_type = variables['defaultservertype']
        if code_type == 'drizzle':
            # base_case
            from lib.sys_mgmt.codeTree import drizzleTree
            test_tree = drizzleTree(basedir,variables,self.system_manager)
            return code_type, test_tree
        elif code_type == 'mysql':
            from lib.sys_mgmt.codeTree import mysqlTree
            test_tree = mysqlTree(basedir,variables,self.system_manager)
            return code_type, test_tree
        elif code_type == 'galera':
            from lib.sys_mgmt.codeTree import galeraTree
            test_tree = galeraTree(basedir, variables, self.system_manager)
            return code_type, test_tree
        elif code_type == 'percona':
            from lib.sys_mgmt.codeTree import perconaTree
            test_tree = perconaTree(basedir,variables,self.system_manager)
            return code_type, test_tree
        else:
            self.logging.error("Tree_type: %s not supported yet" %(tree_type))
            sys.exit(1)