def populate(self, arg_dict): self.work_dir = arg_dict[CtrlItmKeys.fdir] #Msg.trace() Msg.user("self.work_dir: %s" % (self.work_dir), "ParentData::populate()") self.test_root = arg_dict[CtrlItmKeys.test_root] self.mode = arg_dict[CtrlItmKeys.mode] self.force_path = arg_dict[CtrlItmKeys.force_path] self.action = arg_dict[CtrlItmKeys.action] self.process_queue = arg_dict[CtrlItmKeys.process_queue] self.force_cmd = arg_dict[CtrlItmKeys.force_cmd] self.process_max = arg_dict.get(CtrlItmKeys.process_max, CtrlItmDefs.process_max) self.iss_path = arg_dict.get(CtrlItmKeys.iss_path, CtrlItmDefs.iss_path) if not SysUtils.found(self.iss_path.find(self.test_root)): # Msg.user( "Test Root Not Found ..." ) # if not then prepend the test root self.iss_path = PathUtils.include_trailing_path_delimiter( self.test_root) + PathUtils.exclude_leading_path_delimiter( self.iss_path) Msg.user("Final Iss Path: %s" % (self.iss_path), "ISS_PATH") self.timeout = arg_dict.get(CtrlItmKeys.timeout, CtrlItmDefs.timeout) return self
def extract_iss_data(self, arg_item_dict): # first get the iss dictionary # Msg.lout( arg_item_dict, "user", "RAW Item Dictionary ..." ) my_iss_data = arg_item_dict.get(CtrlItmKeys.iss, CtrlItmDefs.iss) my_iss_path = my_iss_data.get(CtrlItmKeys.iss_path, None) if my_iss_path is not None: # if the iss path was not specified then the iss path currently in the parent data instance is the correct one Msg.dbg("Iss Path: %s, Test Root: %s" % (my_iss_path, self.parent_data.test_root)) # check to see if path is absolute path if not SysUtils.found(my_iss_path.find( self.parent_data.test_root)): Msg.dbg("Test Root Not Found ...") # if not then prepend the test root my_iss_path = PathUtils.include_trailing_path_delimiter( self.parent_data.test_root ) + PathUtils.exclude_leading_path_delimiter(my_iss_path) self.parent_data.update_iss_path(my_iss_path) Msg.dbg("Final Iss Path: %s" % (self.parent_data.iss_path))