Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / tools / swarming_client / isolated_format.py
index c5047b0..a18dbd8 100644 (file)
@@ -128,6 +128,7 @@ def walk_includes(isolated):
       yield x
 
 
+@tools.profile
 def expand_symlinks(indir, relfile):
   """Follows symlinks in |relfile|, but treating symlinks that point outside the
   build tree as if they were ordinary directories/files. Returns the final
@@ -147,8 +148,7 @@ def expand_symlinks(indir, relfile):
   symlinks = []
 
   while todo:
-    pre_symlink, symlink, post_symlink = file_path.split_at_symlink(
-        done, todo)
+    pre_symlink, symlink, post_symlink = file_path.split_at_symlink(done, todo)
     if not symlink:
       todo = file_path.fix_native_path_case(done, todo)
       done = os.path.join(done, todo)
@@ -200,6 +200,7 @@ def expand_symlinks(indir, relfile):
   return relfile, symlinks
 
 
+@tools.profile
 def expand_directory_and_symlink(indir, relfile, blacklist, follow_symlinks):
   """Expands a single input. It can result in multiple outputs.
 
@@ -255,7 +256,7 @@ def expand_directory_and_symlink(indir, relfile, blacklist, follow_symlinks):
       relfile = relfile[2:]
     outfiles = symlinks
     try:
-      for filename in os.listdir(infile):
+      for filename in file_path.listdir(infile):
         inner_relfile = os.path.join(relfile, filename)
         if blacklist and blacklist(inner_relfile):
           continue
@@ -300,6 +301,7 @@ def expand_directories_and_symlinks(
   return outfiles
 
 
+@tools.profile
 def file_to_metadata(filepath, prevdict, read_only, algo):
   """Processes an input file, a dependency, and return meta data about it.