def get_result_summary(port_obj, test_files, expectations_str):
    expectations = test_expectations.TestExpectations(
        port_obj, test_files, expectations_str,
        port_obj.test_platform_name(), is_debug_mode=False,
        is_lint_mode=False, tests_are_present=False)

    rs = run_webkit_tests.ResultSummary(expectations, test_files)
    return rs, expectations
Ejemplo n.º 2
0
 def lint_expectations(self, config):
     port = self._port
     test_expectations.TestExpectations(
         port,
         None,
         port.test_expectations(),
         config,
         self._options.lint_test_files,
         port.test_expectations_overrides())
Ejemplo n.º 3
0
 def parse_expectations(self):
     """Parse the expectations from the test_list files and return a data
     structure holding them. Throws an error if the test_list files have
     invalid syntax."""
     port = self._port
     self._expectations = test_expectations.TestExpectations(
         port,
         self._test_files,
         port.test_expectations(),
         port.test_configuration(),
         self._options.lint_test_files,
         port.test_expectations_overrides())
Ejemplo n.º 4
0
    def get_result_summary(self, tests, expectations_str):
        test_paths = [
            self._port._filesystem.join(self._port.layout_tests_dir(), test)
            for test in tests
        ]
        expectations = test_expectations.TestExpectations(
            self._port,
            test_paths,
            expectations_str,
            self._port.test_configuration(),
            is_lint_mode=False)

        rs = result_summary.ResultSummary(expectations, test_paths)
        return test_paths, rs, expectations
Ejemplo n.º 5
0
    def skipped_layout_tests(self, extra_test_files=None):
        expectations_str = self.test_expectations()
        overrides_str = self.test_expectations_overrides()
        is_debug_mode = False

        all_test_files = self.tests([])
        if extra_test_files:
            all_test_files.update(extra_test_files)

        expectations = test_expectations.TestExpectations(
            self, all_test_files, expectations_str, self.test_configuration(),
            is_lint_mode=False, overrides=overrides_str)
        tests_dir = self.layout_tests_dir()
        return [self.relative_test_filename(test)
                for test in expectations.get_tests_with_result_type(test_expectations.SKIP)]
Ejemplo n.º 6
0
    def get_result_summary(self, tests, expectations_str):
        test_paths = [
            os.path.join(self._port.layout_tests_dir(), test) for test in tests
        ]
        expectations = test_expectations.TestExpectations(
            self._port,
            test_paths,
            expectations_str,
            self._port.test_platform_name(),
            is_debug_mode=False,
            is_lint_mode=False,
            tests_are_present=False)

        rs = run_webkit_tests.ResultSummary(expectations, test_paths)
        return test_paths, rs, expectations
    def __init__(self, running_port, target_port, platform, options,
                 url_fetcher, zip_factory, scm):
        """
        Args:
            running_port: the Port the script is running on.
            target_port: the Port the script uses to find port-specific
                configuration information like the test_expectations.txt
                file location and the list of test platforms.
            platform: the test platform to rebaseline
            options: the command-line options object.
            url_fetcher: object that can fetch objects from URLs
            zip_factory: optional object that can fetch zip files from URLs
            scm: scm object for adding new baselines
        """
        self._platform = platform
        self._options = options
        self._port = running_port
        self._filesystem = running_port._filesystem
        self._target_port = target_port

        self._rebaseline_port = port.get(platform,
                                         options,
                                         filesystem=self._filesystem)
        self._rebaselining_tests = set()
        self._rebaselined_tests = []

        # Create tests and expectations helper which is used to:
        #   -. compile list of tests that need rebaselining.
        #   -. update the tests in test_expectations file after rebaseline
        #      is done.
        expectations_str = self._rebaseline_port.test_expectations()
        self._test_expectations = test_expectations.TestExpectations(
            self._rebaseline_port, None, expectations_str,
            self._rebaseline_port.test_configuration(), False)
        self._url_fetcher = url_fetcher
        self._zip_factory = zip_factory
        self._scm = scm
Ejemplo n.º 8
0
    def skipped_layout_tests(self, extra_test_files=None):
        expectations_str = self.test_expectations()
        overrides_str = self.test_expectations_overrides()
        test_platform_name = self.test_platform_name()
        is_debug_mode = False

        all_test_files = test_files.gather_test_files(self, '*')
        if extra_test_files:
            all_test_files.update(extra_test_files)

        expectations = test_expectations.TestExpectations(
            self,
            all_test_files,
            expectations_str,
            test_platform_name,
            is_debug_mode,
            is_lint_mode=True,
            tests_are_present=False,
            overrides=overrides_str)
        tests_dir = self.layout_tests_dir()
        return [
            self.relative_test_filename(test) for test in
            expectations.get_tests_with_result_type(test_expectations.SKIP)
        ]