parameters: (self, proc, utilityPath, timeout, maxTime, startTime, debuggerInfo, symbolsPath)
return_statement: return status
docstring: Wait for tests to finish.
              If maxTime seconds elapse or no output is detected for timeout
              seconds, kill the process and fail the test.
docstring_summary: Wait for tests to finish.
              If maxTime seconds elapse or no output is detected for timeout
              seconds, kill the process and fail the test.
docstring_tokens: Wait for tests to finish . If maxTime seconds elapse or no output is detected for timeout seconds kill the process and fail the test .
function: def waitForFinish(self, proc, utilityPath, timeout, maxTime, startTime, debuggerInfo, symbolsPath):
          """ Wait for tests to finish.
              If maxTime seconds elapse or no output is detected for timeout
              seconds, kill the process and fail the test.
          """
          # maxTime is used to override the default timeout, we should honor that
          status = proc.wait(timeout = maxTime, noOutputTimeout = timeout)
          self.lastTestSeen = proc.getLastTestSeen
  
          topActivity = self._devicemanager.getTopActivity()
          if topActivity == proc.procName:
              proc.kill(True)
          if status == 1:
              if maxTime:
                  print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " \
                        "allowed maximum time of %s seconds" % (self.lastTestSeen, maxTime)
              else:
                  print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " \
                        "allowed maximum time" % (self.lastTestSeen)
          if status == 2:
              print "TEST-UNEXPECTED-FAIL | %s | application timed out after %d seconds with no output" \
                  % (self.lastTestSeen, int(timeout))
  
          return status
function_tokens: def waitForFinish ( self , proc , utilityPath , timeout , maxTime , startTime , debuggerInfo , symbolsPath ) : # maxTime is used to override the default timeout, we should honor that status = proc . wait ( timeout = maxTime , noOutputTimeout = timeout ) self . lastTestSeen = proc . getLastTestSeen topActivity = self . _devicemanager . getTopActivity ( ) if topActivity == proc . procName : proc . kill ( True ) if status == 1 : if maxTime : print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " "allowed maximum time of %s seconds" % ( self . lastTestSeen , maxTime ) else : print "TEST-UNEXPECTED-FAIL | %s | application ran for longer than " "allowed maximum time" % ( self . lastTestSeen ) if status == 2 : print "TEST-UNEXPECTED-FAIL | %s | application timed out after %d seconds with no output" % ( self . lastTestSeen , int ( timeout ) ) return status