示例#1
0
  def setUp(self, test_methods_to_run):
    super(JavaScriptTestRunner, self).setUp(test_methods_to_run)
    additional_metadata = self._get_additional_metadata(test_methods_to_run)
    args = self.get_launch_chrome_command(
        self._get_js_test_options(),
        additional_metadata=additional_metadata)
    prep_launch_chrome.update_arc_metadata(additional_metadata, args)

    # List of sourcemap files. This needs to be sync with the build-time
    # configuration. cf) src/packaging/config.py.
    runtime_dir = build_common.get_runtime_out_dir()
    test_template_dir = build_common.get_build_path_for_gen_test_template(
        self.name)
    annotator = source_annotator.SourceAnnotator([
        ('gen_main.min.js',
         os.path.join(runtime_dir, 'gen_main.min.js'),
         os.path.join(runtime_dir, 'gen_main.min.js.map')),
        ('gen_index.min.js',
         os.path.join(runtime_dir, 'gen_index.min.js'),
         os.path.join(runtime_dir, 'gen_index.min.js.map')),
        ('gen_test.min.js',
         os.path.join(test_template_dir, 'gen_test.min.js'),
         os.path.join(test_template_dir, 'gen_test.min.js.map'))
    ])
    self._logger = _JavaScriptLoggerWrapper(self._logger, annotator)
示例#2
0
  def _get_js_test_options(self):
    args = ['atftest']
    args.extend(self._apks)
    args.extend(['--app-template',
                 build_common.get_build_path_for_gen_test_template(self._name),
                '--run-test-as-app'])
    if self._additional_launch_chrome_args:
      args.extend(self._additional_launch_chrome_args)

    return args
示例#3
0
    def _get_js_test_options(self):
        args = ['atftest']
        args.extend(self._apks)
        args.extend([
            '--app-template',
            build_common.get_build_path_for_gen_test_template(self._name),
            '--run-test-as-app'
        ])
        if self._additional_launch_chrome_args:
            args.extend(self._additional_launch_chrome_args)

        return args
示例#4
0
    def setUp(self, test_methods_to_run):
        super(JavaScriptTestRunner, self).setUp(test_methods_to_run)
        additional_metadata = self._get_additional_metadata(
            test_methods_to_run)
        args = self.get_launch_chrome_command(
            self._get_js_test_options(),
            additional_metadata=additional_metadata)
        prep_launch_chrome.update_arc_metadata(additional_metadata, args)

        # List of sourcemap files. This needs to be sync with the build-time
        # configuration. cf) src/packaging/config.py.
        runtime_dir = build_common.get_runtime_out_dir()
        test_template_dir = build_common.get_build_path_for_gen_test_template(
            self.name)
        annotator = source_annotator.SourceAnnotator([
            ('gen_main.min.js', os.path.join(runtime_dir, 'gen_main.min.js'),
             os.path.join(runtime_dir, 'gen_main.min.js.map')),
            ('gen_index.min.js', os.path.join(runtime_dir, 'gen_index.min.js'),
             os.path.join(runtime_dir, 'gen_index.min.js.map')),
            ('gen_test.min.js',
             os.path.join(test_template_dir, 'gen_test.min.js'),
             os.path.join(test_template_dir, 'gen_test.min.js.map'))
        ])
        self._logger = _JavaScriptLoggerWrapper(self._logger, annotator)