Example #1
0
def run_remote_integration_tests(parsed_args, argv,
                                 configs_for_integration_tests):
  executor = _create_remote_executor(
      parsed_args, enable_pseudo_tty=parsed_args.ansi)
  try:
    executor.rsync(
        remote_executor_util.get_integration_test_deps() +
        configs_for_integration_tests,
        executor.get_remote_arc_root())
    _set_nacl_resource_permission(executor)

    command = ' '.join(
        ['cd', executor.get_remote_arc_root(), '&&',
         remote_executor_util.SYNC_CHROME, '--verbose', '&&',
         remote_executor_util.SYNC_ADB, '--target=win-x86_64', '&&',
         remote_executor_util.SYNC_ANDROID_SDK_BUILD_TOOLS, '&&',
         executor.get_remote_env(),
         './run_integration_tests'] +
        remote_executor_util.create_launch_remote_chrome_param(argv) +
        # Some tests rely on the error message, which can be localized.
        # So here, set lang=en_US to avoid such message mismatching.
        ['--launch-chrome-opt=--lang=en_US'])
    executor.run(command)
    return 0
  except subprocess.CalledProcessError as e:
    return e.returncode
Example #2
0
def run_remote_integration_tests(parsed_args, argv,
                                 configs_for_integration_tests):
    executor = _create_remote_executor(parsed_args,
                                       enable_pseudo_tty=parsed_args.ansi)
    try:
        executor.rsync(
            remote_executor_util.get_integration_test_deps() +
            configs_for_integration_tests, executor.get_remote_arc_root())
        _set_nacl_resource_permission(executor)

        command = ' '.join(
            [
                'cd',
                executor.get_remote_arc_root(), '&&',
                remote_executor_util.SYNC_CHROME, '--verbose', '&&',
                remote_executor_util.SYNC_ADB, '--target=win-x86_64', '&&',
                remote_executor_util.SYNC_ANDROID_SDK_BUILD_TOOLS, '&&',
                executor.get_remote_env(), './run_integration_tests'
            ] + remote_executor_util.create_launch_remote_chrome_param(argv) +
            # Some tests rely on the error message, which can be localized.
            # So here, set lang=en_US to avoid such message mismatching.
            ['--launch-chrome-opt=--lang=en_US'])
        executor.run(command)
        return 0
    except subprocess.CalledProcessError as e:
        return e.returncode
Example #3
0
def _get_archived_file_paths():
  """Returns the file paths to be archived."""
  paths = _collect_descendants(
      remote_executor_util.get_integration_test_deps())
  paths |= set(run_integration_tests.get_dependencies_for_integration_tests())
  paths.add(os.path.relpath(toolchain.get_adb_path_for_chromeos(),
                            build_common.get_arc_root()))
  return paths
Example #4
0
def _get_archived_file_paths():
    """Returns the file paths to be archived."""
    paths = _collect_descendants(
        remote_executor_util.get_integration_test_deps())
    paths |= set(
        run_integration_tests.get_dependencies_for_integration_tests())
    paths.add(
        os.path.relpath(toolchain.get_adb_path_for_chromeos(),
                        build_common.get_arc_root()))
    return paths
def run_remote_integration_tests(parsed_args, argv, configs_for_integration_tests):
    try:
        executor = _create_remote_executor(parsed_args, enable_pseudo_tty=parsed_args.ansi)
        copied_files = remote_executor_util.get_integration_test_deps() + configs_for_integration_tests
        _setup_remote_environment(parsed_args, executor, copied_files)
        command = " ".join(
            ["sudo", "-u", "chronos", executor.get_remote_env(), "/bin/sh", "./run_integration_tests"]
            + remote_executor_util.create_launch_remote_chrome_param(argv)
        )
        executor.run_with_filter(command)
        return 0
    except subprocess.CalledProcessError as e:
        return e.returncode
Example #6
0
def run_remote_integration_tests(parsed_args, argv,
                                 configs_for_integration_tests):
    try:
        executor = _create_remote_executor(parsed_args,
                                           enable_pseudo_tty=parsed_args.ansi)
        copied_files = (remote_executor_util.get_integration_test_deps() +
                        configs_for_integration_tests)
        _setup_remote_environment(parsed_args, executor, copied_files)
        command = ' '.join([
            'sudo', '-u', 'chronos',
            executor.get_remote_env(), '/bin/sh', './run_integration_tests'
        ] + remote_executor_util.create_launch_remote_chrome_param(argv))
        executor.run_with_filter(command)
        return 0
    except subprocess.CalledProcessError as e:
        return e.returncode