def get_results_dir_list(pid, core_dir_basename):
 pid_dir_dict = {}
 for debugdir_file in glob.glob('/tmp/autotest_results_dir.*'):
  a_pid = os.path.splitext(debugdir_file)[1]
  results_dir = open(debugdir_file).read().strip()
  pid_dir_dict[a_pid] = os.path.join(results_dir, core_dir_basename)
 results_dir_list = []
 if (pid is not None):
  while (pid > 1):
   if (pid in pid_dir_dict):
    results_dir_list.append(pid_dir_dict[pid])
   pid = get_parent_pid(pid)
 else:
  results_dir_list = pid_dir_dict.values()
 return (results_dir_list or pid_dir_dict.values() or [os.path.join('/tmp', core_dir_basename)])

def get_results_dir_list ( pid , core_dir_basename ) : pid_dir_dict = { } for debugdir_file in glob . glob ( '/tmp/autotest_results_dir.*' ) : a_pid = os . path . splitext ( debugdir_file ) [ 1 ] results_dir = open ( debugdir_file ) . read ( ) . strip ( ) pid_dir_dict [ a_pid ] = os . path . join ( results_dir , core_dir_basename ) results_dir_list = [ ] if ( pid is not None ) : while ( pid > 1 ) : if ( pid in pid_dir_dict ) : results_dir_list . append ( pid_dir_dict [ pid ] ) pid = get_parent_pid ( pid ) else : results_dir_list = pid_dir_dict . values ( ) return ( results_dir_list or pid_dir_dict . values ( ) or [ os . path . join ( '/tmp' , core_dir_basename ) ] )
get all valid output directories for the core file and the report .