chrome/updater/test/service/win/updater_test_service_control.py
def StartService(timeout=30):
  """Start updater test service and make sure it is reachable.

  Args:
    timeout: How long to wait for service to be ready.

  Returns:
    True if the service is started successfully.
  """
  logging.info('Starting service [%s].', _UPDATER_TEST_SERVICE_NAME)
  if _IsServiceInStatus(win32service.SERVICE_RUNNING):
    logging.info('Test service is already running.')
    return True

  try:
    win32serviceutil.StartService(_UPDATER_TEST_SERVICE_NAME)
    if not _WaitServiceStatus(win32service.SERVICE_RUNNING, timeout):
      logging.error('Wait for service start failed.')
      return False

    logging.error('Service %s started.', _UPDATER_TEST_SERVICE_NAME)
    return rpc_client.TestConnection()
  except _ServiceErrors as err:
    logging.error('Failed to start service.')
    logging.exception(err)

  return False
Start updater test service and make sure it is reachable.

  Args:
    timeout: How long to wait for service to be ready.

  Returns:
    True if the service is started successfully.
  
Start updater test service and make sure it is reachable.
Start updater test service and make sure it is reachable .
def StartService(timeout=30):
  logging.info('Starting service [%s].', _UPDATER_TEST_SERVICE_NAME)
  if _IsServiceInStatus(win32service.SERVICE_RUNNING):
    logging.info('Test service is already running.')
    return True
  try:
    win32serviceutil.StartService(_UPDATER_TEST_SERVICE_NAME)
    if not _WaitServiceStatus(win32service.SERVICE_RUNNING, timeout):
      logging.error('Wait for service start failed.')
      return False
    logging.error('Service %s started.', _UPDATER_TEST_SERVICE_NAME)
    return rpc_client.TestConnection()
  except _ServiceErrors as err:
    logging.error('Failed to start service.')
    logging.exception(err)
  return False
def StartService ( timeout = 30 ) : logging . info ( 'Starting service [%s].' , _UPDATER_TEST_SERVICE_NAME ) if _IsServiceInStatus ( win32service . SERVICE_RUNNING ) : logging . info ( 'Test service is already running.' ) return True try : win32serviceutil . StartService ( _UPDATER_TEST_SERVICE_NAME ) if not _WaitServiceStatus ( win32service . SERVICE_RUNNING , timeout ) : logging . error ( 'Wait for service start failed.' ) return False logging . error ( 'Service %s started.' , _UPDATER_TEST_SERVICE_NAME ) return rpc_client . TestConnection ( ) except _ServiceErrors as err : logging . error ( 'Failed to start service.' ) logging . exception ( err ) return False
Start updater test service and make sure it is reachable.
Start updater test service and make sure it is reachable .
"""Start updater test service and make sure it is reachable.

  Args:
    timeout: How long to wait for service to be ready.

  Returns:
    True if the service is started successfully.
  """
True if the service is started successfully.
True if the service is started successfully .
timeout
None