tools/perf/fetch_benchmark_deps.py
def _EnumerateDependencies(story_set):
  """Enumerates paths of files needed by a user story set."""
  deps = set()
  # Enumerate WPRs
  for story in story_set:
    deps.add(story_set.WprFilePathForStory(story))

  # Enumerate files in serving_dirs
  for directory in story_set.serving_dirs:
    if not os.path.isdir(directory):
      raise ValueError('Must provide a valid directory.')
    # Don't allow the root directory to be a serving_dir.
    if directory == os.path.abspath(os.sep):
      raise ValueError('Trying to serve root directory from HTTP server.')
    for dirpath, _, filenames in os.walk(directory):
      for filename in filenames:
        path_name, extension = os.path.splitext(
            os.path.join(dirpath, filename))
        if extension == '.sha1':
          deps.add(path_name)

  # Return relative paths.
  prefix_len = len(os.path.realpath(path_util.GetChromiumSrcDir())) + 1
  return [dep[prefix_len:] for dep in deps if dep]
Enumerates paths of files needed by a user story set.
Enumerates paths of files needed by a user story set.
Enumerates paths of files needed by a user story set .
def _EnumerateDependencies(story_set):
  deps = set()
  for story in story_set:
    deps.add(story_set.WprFilePathForStory(story))
  for directory in story_set.serving_dirs:
    if not os.path.isdir(directory):
      raise ValueError('Must provide a valid directory.')
    if directory == os.path.abspath(os.sep):
      raise ValueError('Trying to serve root directory from HTTP server.')
    for dirpath, _, filenames in os.walk(directory):
      for filename in filenames:
        path_name, extension = os.path.splitext(
            os.path.join(dirpath, filename))
        if extension == '.sha1':
          deps.add(path_name)
  prefix_len = len(os.path.realpath(path_util.GetChromiumSrcDir())) + 1
  return [dep[prefix_len:] for dep in deps if dep]
def _EnumerateDependencies ( story_set ) : deps = set ( ) for story in story_set : deps . add ( story_set . WprFilePathForStory ( story ) ) for directory in story_set . serving_dirs : if not os . path . isdir ( directory ) : raise ValueError ( 'Must provide a valid directory.' ) if directory == os . path . abspath ( os . sep ) : raise ValueError ( 'Trying to serve root directory from HTTP server.' ) for dirpath , _ , filenames in os . walk ( directory ) : for filename in filenames : path_name , extension = os . path . splitext ( os . path . join ( dirpath , filename ) ) if extension == '.sha1' : deps . add ( path_name ) prefix_len = len ( os . path . realpath ( path_util . GetChromiumSrcDir ( ) ) ) + 1 return [ dep [ prefix_len : ] for dep in deps if dep ]
Enumerates paths of files needed by a user story set.
Enumerates paths of files needed by a user story set .
"""Enumerates paths of files needed by a user story set.""" # Enumerate WPRs # Enumerate files in serving_dirs # Don't allow the root directory to be a serving_dir. # Return relative paths.
story_set