testing/chromoting/chromoting_test_utilities.py
def InitialiseTestMachineForLinux(cfg_file):
  """Sets up a Linux machine for connect-to-host chromoting tests.

  Copy over me2me host-config to expected locations.
  By default, the Linux me2me host expects the host-config file to be under
  $HOME/.config/chrome-remote-desktop
  Its name is expected to have a hash that is specific to a machine.

  Args:
    cfg_file: location of test account's host-config file.

  Raises:
    Exception: if host did not start properly.
  """

  # First get home directory on current machine.
  home_dir = expanduser('~')
  default_config_file_location = os.path.join(home_dir, '.config', CRD_ID)
  if os.path.exists(default_config_file_location):
    shutil.rmtree(default_config_file_location)
  os.makedirs(default_config_file_location)

  # Copy over test host-config to expected location, with expected file-name.
  # The file-name should contain a hash-value that is machine-specific.
  default_config_file_name = 'host#%s.json' % HOST_HASH_VALUE
  config_file_src = os.path.join(os.getcwd(), cfg_file)
  shutil.copyfile(
      config_file_src,
      os.path.join(default_config_file_location, default_config_file_name))

  # Make sure chromoting host is running.
  RestartMe2MeHost()
Sets up a Linux machine for connect-to-host chromoting tests.

  Copy over me2me host-config to expected locations.
  By default, the Linux me2me host expects the host-config file to be under
  $HOME/.config/chrome-remote-desktop
  Its name is expected to have a hash that is specific to a machine.

  Args:
    cfg_file: location of test account's host-config file.

  Raises:
    Exception: if host did not start properly.
  
Sets up a Linux machine for connect-to-host chromoting tests.
Copy over me2me host-config to expected locations.
By default, the Linux me2me host expects the host-config file to be under
$HOME/.config/chrome-remote-desktop
Its name is expected to have a hash that is specific to a machine.
Sets up a Linux machine for connect - to - host chromoting tests . Copy over me2me host - config to expected locations . By default the Linux me2me host expects the host - config file to be under $HOME / . config / chrome - remote - desktop Its name is expected to have a hash that is specific to a machine .
def InitialiseTestMachineForLinux(cfg_file):
  home_dir = expanduser('~')
  default_config_file_location = os.path.join(home_dir, '.config', CRD_ID)
  if os.path.exists(default_config_file_location):
    shutil.rmtree(default_config_file_location)
  os.makedirs(default_config_file_location)
  default_config_file_name = 'host#%s.json' % HOST_HASH_VALUE
  config_file_src = os.path.join(os.getcwd(), cfg_file)
  shutil.copyfile(
      config_file_src,
      os.path.join(default_config_file_location, default_config_file_name))
  RestartMe2MeHost()
def InitialiseTestMachineForLinux ( cfg_file ) : home_dir = expanduser ( '~' ) default_config_file_location = os . path . join ( home_dir , '.config' , CRD_ID ) if os . path . exists ( default_config_file_location ) : shutil . rmtree ( default_config_file_location ) os . makedirs ( default_config_file_location ) default_config_file_name = 'host#%s.json' % HOST_HASH_VALUE config_file_src = os . path . join ( os . getcwd ( ) , cfg_file ) shutil . copyfile ( config_file_src , os . path . join ( default_config_file_location , default_config_file_name ) ) RestartMe2MeHost ( )
Sets up a Linux machine for connect-to-host chromoting tests.
Sets up a Linux machine for connect - to - host chromoting tests .
"""Sets up a Linux machine for connect-to-host chromoting tests.

  Copy over me2me host-config to expected locations.
  By default, the Linux me2me host expects the host-config file to be under
  $HOME/.config/chrome-remote-desktop
  Its name is expected to have a hash that is specific to a machine.

  Args:
    cfg_file: location of test account's host-config file.

  Raises:
    Exception: if host did not start properly.
  """ # First get home directory on current machine. # Copy over test host-config to expected location, with expected file-name. # The file-name should contain a hash-value that is machine-specific. # Make sure chromoting host is running.
if host did not start properly.
if host did not start properly .
Exception
cfg_file
location of test account's host-config file.
location of test account ' s host - config file .