def BuildStartArgs(args):
    """Builds the command for starting the bigtable emulator.

  Args:
    args: (list of str) The arguments for the bigtable emulator, excluding the
      program binary.

  Returns:
    A list of command arguments.
  """
    bigtable_dir = util.GetEmulatorRoot(BIGTABLE)
    bigtable_executable = os.path.join(bigtable_dir, BIGTABLE_EXECUTABLE)
    return execution_utils.ArgsForExecutableTool(bigtable_executable, *args)
Beispiel #2
0
def BuildStartArgs(args, current_os):
  """Builds the command for starting the pubsub emulator.

  Args:
    args: (list of str) The arguments for the pubsub emulator, excluding the
      program binary.
    current_os: (platforms.OperatingSystem)

  Returns:
    A list of command arguments.
  """
  pubsub_dir = util.GetEmulatorRoot(PUBSUB)
  if current_os is platforms.OperatingSystem.WINDOWS:
    pubsub_executable = os.path.join(
        pubsub_dir, r'bin\cloud-pubsub-emulator.bat')
    return execution_utils.ArgsForCMDTool(pubsub_executable, *args)

  pubsub_executable = os.path.join(pubsub_dir, 'bin/cloud-pubsub-emulator')
  return execution_utils.ArgsForExecutableTool(pubsub_executable, *args)