예제 #1
0
 def RetrieveOutputFiles(self):
     """Retrieves all files in the output-dir."""
     files = self.rpc.ListDir(self.output_dir)
     for fname in files:
         remote_path = self.rpc.PathJoin(self.output_dir, fname)
         local_name = os.path.join(common_lib.GetOutputDir(),
                                   '%s.%s' % (self.name, fname))
         contents = self.rpc.ReadFile(remote_path)
         with open(local_name, 'wb+') as fh:
             fh.write(contents)
예제 #2
0
 def _CreateOutputFilename(self, fname):
     return os.path.join(common_lib.GetOutputDir(),
                         '%s.%s' % (self.key, fname))
예제 #3
0
 def GetOutputDir(self):
     """Returns the isolated output directory on the task machine."""
     return common_lib.GetOutputDir()