Example #1
0
 def __call__(self):
     if self.reported is None or (time.time() - self.reported) > 300:
         sys.stdout.write('\nAs of %s, global test lock is owned by another test process:\n  ' % time.strftime('%c'))
         sys.stdout.write('\n  '.join(read_file(self.fpath).strip().split('\n')) + '\n')
         sys.stdout.flush()
         self.reported = time.time()
     else:
         sys.stdout.write("~")
         sys.stdout.flush()
     time.sleep(self.delay)
Example #2
0
 def get_cached_components(self):
     """
     Return a list of Component objects that describe the building blocks
     of the sandbox, as analyzed and cached the last time the sandbox was
     updated. Each object has a name, branch, revision, and aspect. The list
     is in inverse dependency order, meaning that the components that should
     be built first are at the top of the list, and the top component in the
     in the sandbox is at the bottom.
     """
     try:
         lines = ioutil.read_file(self.get_dependencies_file_path())
         lines = [l.strip() for l in lines.split("\n") if l.strip() and l.find(":") > -1]
         cc = [component.parse_component_line(l, self.get_branch()) for l in lines if not l.startswith(";")]
         return cc
     except:
         pass
Example #3
0
 def get_cached_components(self):
     '''
     Return a list of Component objects that describe the building blocks
     of the sandbox, as analyzed and cached the last time the sandbox was
     updated. Each object has a name, branch, revision, and aspect. The list
     is in inverse dependency order, meaning that the components that should
     be built first are at the top of the list, and the top component in the
     in the sandbox is at the bottom.
     '''
     try:
         lines = ioutil.read_file(self.get_dependencies_file_path())
         lines = [
             l.strip() for l in lines.split('\n')
             if l.strip() and l.find(':') > -1
         ]
         cc = [
             component.parse_component_line(l, self.get_branch())
             for l in lines if not l.startswith(';')
         ]
         return cc
     except:
         pass