def __init__(self, variables, tree_type='drizzle'): self.logging = loggingManager(variables) if variables['verbose']: self.logging.verbose("Initializing system manager...") self.skip_keys = [ 'code_tree' , 'ld_lib_paths' , 'port_manager' , 'logging_manager' , 'environment_reqs' , 'env_var_delimiter'] self.debug = variables['debug'] self.verbose = variables['verbose'] self.env_var_delimiter = ':' self.no_shm = variables['noshm'] self.shm_path = self.find_path(["/dev/shm", "/tmp"], required=0) self.cur_os = os.uname()[0] self.cur_user = getpass.getuser() self.workdir = os.path.abspath(variables['workdir']) self.testdir = os.path.abspath(variables['testdir']) self.datadir = os.path.abspath(os.path.join(variables['testdir'],'dbqp_data')) self.top_srcdir = os.path.abspath(variables['topsrcdir']) self.top_builddir = os.path.abspath(variables['topbuilddir']) self.start_dirty = variables['startdirty'] self.valgrind = variables['valgrind'] self.gdb = variables['gdb'] self.manual_gdb = variables['manualgdb'] self.randgen_path = variables['randgenpath'] # we use this to preface commands in order to run valgrind and such self.cmd_prefix = '' self.port_manager = portManager(self,variables['debug']) self.time_manager = timeManager(self) # Make sure the tree we are testing looks good self.code_tree = self.get_code_tree(variables, tree_type) self.ld_lib_paths = self.join_env_var_values(self.code_tree.ld_lib_paths) # Some ENV vars are system-standard # We describe and set them here and now # The format is name: (value, append, suffix) self.environment_reqs = { 'UMASK':'0660' , 'UMASK_DIR' : '0770' , 'LC_ALL' : 'C' , 'LC_CTYPE' : 'C' , 'LC_COLLATE' : 'C' , 'USE_RUNNING_SERVER' : "0" , 'TOP_SRCDIR' : self.top_srcdir , 'TOP_BUILDDIR' : self.top_builddir , 'DRIZZLE_TEST_DIR' : self.code_tree.testdir , 'DTR_BUILD_THREAD' : "-69.5" , 'LD_LIBRARY_PATH' : self.append_env_var( 'LD_LIBRARY_PATH' , self.ld_lib_paths , suffix = 0 , quiet = 1 ) , 'DYLD_LIBRARY_PATH' : self.append_env_var( 'DYLD_LIBRARY_PATH' , self.ld_lib_paths , suffix = 0 , quiet = 1 ) } # set the env vars we need # self.process_environment_reqs(self.environment_reqs) self.update_environment_vars(self.environment_reqs) # We find or generate our id file # We use a uuid to identify the symlinked # workdirs. That way, each installation # Will have a uuid/tmpfs workingdir # We store in a file so we know what # is ours self.uuid = self.get_uuid() self.symlink_name = 'dbqp_workdir_%s_%s' %(self.cur_user, self.uuid) # initialize our workdir self.process_workdir() # check for libtool self.libtool = self.libtool_check() # See if we need to do any further processing for special # options like valgrind and gdb self.handle_additional_reqs(variables) if self.debug: self.logging.debug_class(self)
def __init__(self, variables, tree_type='drizzle'): self.logging = loggingManager(variables) if variables['verbose']: self.logging.verbose("Initializing system manager...") self.skip_keys = [ 'port_manager' , 'logging' , 'code_manager' , 'env_manager' , 'environment_reqs' ] self.debug = variables['debug'] self.verbose = variables['verbose'] self.port_manager = portManager(self,variables['debug']) self.time_manager = timeManager(self) # environment manager handles updates / whatever to testing environments self.env_manager = environmentManager(self, variables) self.no_shm = variables['noshm'] self.shm_path = self.find_path(["/dev/shm", "/tmp"], required=0) self.cur_os = os.uname()[0] self.cur_user = getpass.getuser() self.rootdir = variables['qp_root'] self.workdir = os.path.abspath(variables['workdir']) self.testdir = os.path.abspath(variables['testdir']) self.datadir = os.path.join(self.rootdir,'qp_data') self.top_srcdir = os.path.abspath(variables['topsrcdir']) self.top_builddir = os.path.abspath(variables['topbuilddir']) self.start_dirty = variables['startdirty'] self.valgrind = variables['valgrind'] self.valgrind_suppress_file = variables['valgrindsuppressions'] self.helgrind = variables['helgrind'] # helgrind implies --valgrind if self.helgrind: self.valgrind=self.helgrind self.gdb = variables['gdb'] self.manual_gdb = variables['manualgdb'] self.randgen_path = variables['randgenpath'] self.randgen_seed = variables['randgenseed'] # there may be a better place to put this... self.innobackupex_path = variables['innobackupexpath'] self.xtrabackup_path = variables['xtrabackuppath'] self.tar4ibd_path = variables['tar4ibdpath'] # We add tar4ibd to PATH if defined if self.tar4ibd_path: self.env_manager.set_env_var( 'PATH', self.env_manager.append_env_var( 'PATH' , os.path.dirname(self.tar4ibd_path) , suffix=0 )) self.wsrep_provider_path = variables['wsrepprovider'] # we use this to preface commands in order to run valgrind and such self.cmd_prefix = '' # We find or generate our id file # We use a uuid to identify the symlinked # workdirs. That way, each installation # Will have a uuid/tmpfs workingdir # We store in a file so we know what # is ours self.uuid = self.get_uuid() self.symlink_name = 'qp_workdir_%s_%s' %(self.cur_user, self.uuid) # initialize our workdir self.process_workdir() # Some ENV vars are system-standard # We describe and set them here and now # The format is name: (value, append, suffix) self.environment_reqs = { 'UMASK':'0660' , 'UMASK_DIR' : '0770' , 'LC_ALL' : 'C' , 'LC_CTYPE' : 'C' , 'LC_COLLATE' : 'C' , 'USE_RUNNING_SERVER' : "0" , 'TOP_SRCDIR' : self.top_srcdir , 'TOP_BUILDDIR' : self.top_builddir , 'DRIZZLE_TEST_DIR' : self.testdir , 'DTR_BUILD_THREAD' : "-69.5" } # set the env vars we need # self.process_environment_reqs(self.environment_reqs) self.env_manager.update_environment_vars(self.environment_reqs) # use our code_manager to handle the various basedirs # we have been passed self.code_manager = codeManager(self, variables) # check for libtool self.libtool = self.libtool_check() # See if we need to do any further processing for special # options like valgrind and gdb self.handle_additional_reqs(variables) self.logging.debug_class(self)
def __init__(self, variables, tree_type='drizzle'): self.logging = loggingManager(variables) if variables['verbose']: self.logging.verbose("Initializing system manager...") self.skip_keys = [ 'port_manager', 'logging', 'code_manager', 'env_manager', 'environment_reqs' ] self.debug = variables['debug'] self.verbose = variables['verbose'] self.port_manager = portManager(self, variables['debug']) self.time_manager = timeManager(self) # environment manager handles updates / whatever to testing environments self.env_manager = environmentManager(self, variables) self.no_shm = variables['noshm'] self.shm_path = self.find_path(["/dev/shm", "/tmp"], required=0) self.cur_os = os.uname()[0] self.cur_user = getpass.getuser() self.rootdir = variables['qp_root'] self.workdir = os.path.abspath(variables['workdir']) self.testdir = os.path.abspath(variables['testdir']) self.datadir = os.path.join(self.rootdir, 'qp_data') self.top_srcdir = os.path.abspath(variables['topsrcdir']) self.top_builddir = os.path.abspath(variables['topbuilddir']) self.start_dirty = variables['startdirty'] self.valgrind = variables['valgrind'] self.valgrind_suppress_file = variables['valgrindsuppressions'] self.helgrind = variables['helgrind'] # helgrind implies --valgrind if self.helgrind: self.valgrind = self.helgrind self.gdb = variables['gdb'] self.manual_gdb = variables['manualgdb'] self.randgen_path = variables['randgenpath'] self.randgen_seed = variables['randgenseed'] # there may be a better place to put this... self.innobackupex_path = variables['innobackupexpath'] self.xtrabackup_path = variables['xtrabackuppath'] self.tar4ibd_path = variables['tar4ibdpath'] # We add tar4ibd to PATH if defined if self.tar4ibd_path: self.env_manager.set_env_var( 'PATH', self.env_manager.append_env_var('PATH', os.path.dirname( self.tar4ibd_path), suffix=0)) self.wsrep_provider_path = variables['wsrepprovider'] # we use this to preface commands in order to run valgrind and such self.cmd_prefix = '' # We find or generate our id file # We use a uuid to identify the symlinked # workdirs. That way, each installation # Will have a uuid/tmpfs workingdir # We store in a file so we know what # is ours self.uuid = self.get_uuid() self.symlink_name = 'qp_workdir_%s_%s' % (self.cur_user, self.uuid) # initialize our workdir self.process_workdir() # Some ENV vars are system-standard # We describe and set them here and now # The format is name: (value, append, suffix) self.environment_reqs = { 'UMASK': '0660', 'UMASK_DIR': '0770', 'LC_ALL': 'C', 'LC_CTYPE': 'C', 'LC_COLLATE': 'C', 'USE_RUNNING_SERVER': "0", 'TOP_SRCDIR': self.top_srcdir, 'TOP_BUILDDIR': self.top_builddir, 'DRIZZLE_TEST_DIR': self.testdir, 'DTR_BUILD_THREAD': "-69.5" } # set the env vars we need # self.process_environment_reqs(self.environment_reqs) self.env_manager.update_environment_vars(self.environment_reqs) # use our code_manager to handle the various basedirs # we have been passed self.code_manager = codeManager(self, variables) # check for libtool self.libtool = self.libtool_check() # See if we need to do any further processing for special # options like valgrind and gdb self.handle_additional_reqs(variables) self.logging.debug_class(self)
def __init__(self, variables, tree_type='drizzle'): self.logging = loggingManager(variables) if variables['verbose']: self.logging.verbose("Initializing system manager...") self.skip_keys = [ 'code_tree', 'ld_lib_paths', 'port_manager', 'logging_manager', 'environment_reqs', 'env_var_delimiter' ] self.debug = variables['debug'] self.verbose = variables['verbose'] self.env_var_delimiter = ':' self.no_shm = variables['noshm'] self.shm_path = self.find_path(["/dev/shm", "/tmp"], required=0) self.cur_os = os.uname()[0] self.cur_user = getpass.getuser() self.workdir = os.path.abspath(variables['workdir']) self.testdir = os.path.abspath(variables['testdir']) self.datadir = os.path.abspath( os.path.join(variables['testdir'], 'dbqp_data')) self.top_srcdir = os.path.abspath(variables['topsrcdir']) self.top_builddir = os.path.abspath(variables['topbuilddir']) self.start_dirty = variables['startdirty'] self.valgrind = variables['valgrind'] self.gdb = variables['gdb'] self.manual_gdb = variables['manualgdb'] self.randgen_path = variables['randgenpath'] # we use this to preface commands in order to run valgrind and such self.cmd_prefix = '' self.port_manager = portManager(self, variables['debug']) self.time_manager = timeManager(self) # Make sure the tree we are testing looks good self.code_tree = self.get_code_tree(variables, tree_type) self.ld_lib_paths = self.join_env_var_values( self.code_tree.ld_lib_paths) # Some ENV vars are system-standard # We describe and set them here and now # The format is name: (value, append, suffix) self.environment_reqs = { 'UMASK': '0660', 'UMASK_DIR': '0770', 'LC_ALL': 'C', 'LC_CTYPE': 'C', 'LC_COLLATE': 'C', 'USE_RUNNING_SERVER': "0", 'TOP_SRCDIR': self.top_srcdir, 'TOP_BUILDDIR': self.top_builddir, 'DRIZZLE_TEST_DIR': self.code_tree.testdir, 'DTR_BUILD_THREAD': "-69.5", 'LD_LIBRARY_PATH': self.append_env_var('LD_LIBRARY_PATH', self.ld_lib_paths, suffix=0, quiet=1), 'DYLD_LIBRARY_PATH': self.append_env_var('DYLD_LIBRARY_PATH', self.ld_lib_paths, suffix=0, quiet=1) } # set the env vars we need # self.process_environment_reqs(self.environment_reqs) self.update_environment_vars(self.environment_reqs) # We find or generate our id file # We use a uuid to identify the symlinked # workdirs. That way, each installation # Will have a uuid/tmpfs workingdir # We store in a file so we know what # is ours self.uuid = self.get_uuid() self.symlink_name = 'dbqp_workdir_%s_%s' % (self.cur_user, self.uuid) # initialize our workdir self.process_workdir() # check for libtool self.libtool = self.libtool_check() # See if we need to do any further processing for special # options like valgrind and gdb self.handle_additional_reqs(variables) if self.debug: self.logging.debug_class(self)