• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python json_results_generator.test_timings_trie函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中webkitpy.layout_tests.layout_package.json_results_generator.test_timings_trie函数的典型用法代码示例。如果您正苦于以下问题:Python test_timings_trie函数的具体用法?Python test_timings_trie怎么用?Python test_timings_trie使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了test_timings_trie函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_test_timings_trie

    def test_test_timings_trie(self):
        test_port = test.TestPort(MockHost())
        individual_test_timings = []
        individual_test_timings.append(json_results_generator.TestResult("foo/bar/baz.html", elapsed_time=1.2))
        individual_test_timings.append(json_results_generator.TestResult("bar.html", elapsed_time=0.0001))
        trie = json_results_generator.test_timings_trie(test_port, individual_test_timings)

        expected_trie = {"bar.html": 0, "foo": {"bar": {"baz.html": 1200}}}

        self.assertEqual(json.dumps(trie), json.dumps(expected_trie))
开发者ID:sukwon0709,项目名称:Artemis,代码行数:10,代码来源:json_results_generator_unittest.py


示例2: _upload_json_files

    def _upload_json_files(self, summarized_results, initial_results, results_including_passes=None, start_time=None, end_time=None):
        """Writes the results of the test run as JSON files into the results
        dir and upload the files to the appengine server.

        Args:
          summarized_results: dict of results
          initial_results: full summary object
        """
        _log.debug("Writing JSON files in %s." % self._results_directory)

        # FIXME: Upload stats.json to the server and delete times_ms.
        times_trie = json_results_generator.test_timings_trie(self._port, initial_results.results_by_name.values())
        times_json_path = self._filesystem.join(self._results_directory, "times_ms.json")
        json_results_generator.write_json(self._filesystem, times_trie, times_json_path)

        stats_trie = self._stats_trie(initial_results)
        stats_path = self._filesystem.join(self._results_directory, "stats.json")
        self._filesystem.write_text_file(stats_path, json.dumps(stats_trie))

        full_results_path = self._filesystem.join(self._results_directory, "full_results.json")
        # We write full_results.json out as jsonp because we need to load it from a file url and Chromium doesn't allow that.
        json_results_generator.write_json(self._filesystem, summarized_results, full_results_path, callback="ADD_RESULTS")

        results_json_path = self._filesystem.join(self._results_directory, "results_including_passes.json")
        if results_including_passes:
            json_results_generator.write_json(self._filesystem, results_including_passes, results_json_path)

        generator = json_layout_results_generator.JSONLayoutResultsGenerator(
            self._port, self._options.builder_name, self._options.build_name,
            self._options.build_number, self._results_directory,
            self._expectations, initial_results,
            self._options.test_results_server,
            "layout-tests",
            self._options.master_name)

        if generator.generate_json_output():
            _log.debug("Finished writing JSON file for the test results server.")
        else:
            _log.debug("Failed to generate JSON file for the test results server.")
            return

        json_files = ["incremental_results.json", "full_results.json", "times_ms.json"]

        generator.upload_json_files(json_files)
        if results_including_passes:
            self.upload_results(results_json_path, start_time, end_time)

        incremental_results_path = self._filesystem.join(self._results_directory, "incremental_results.json")

        # Remove these files from the results directory so they don't take up too much space on the buildbot.
        # The tools use the version we uploaded to the results server anyway.
        self._filesystem.remove(times_json_path)
        self._filesystem.remove(incremental_results_path)
        if results_including_passes:
            self._filesystem.remove(results_json_path)
开发者ID:eocanha,项目名称:webkit,代码行数:55,代码来源:manager.py


示例3: _upload_json_files

    def _upload_json_files(self, summarized_results, result_summary,
                           individual_test_timings):
        """Writes the results of the test run as JSON files into the results
        dir and upload the files to the appengine server.

        Args:
          unexpected_results: dict of unexpected results
          summarized_results: dict of results
          result_summary: full summary object
          individual_test_timings: list of test times (used by the flakiness
            dashboard).
        """
        _log.debug("Writing JSON files in %s." % self._results_directory)

        times_trie = json_results_generator.test_timings_trie(
            self._port, individual_test_timings)
        times_json_path = self._filesystem.join(self._results_directory,
                                                "times_ms.json")
        json_results_generator.write_json(self._filesystem, times_trie,
                                          times_json_path)

        full_results_path = self._filesystem.join(self._results_directory,
                                                  "full_results.json")
        # We write full_results.json out as jsonp because we need to load it from a file url and Chromium doesn't allow that.
        json_results_generator.write_json(
            self._filesystem,
            summarized_results,
            full_results_path,
            callback="ADD_RESULTS")

        generator = json_layout_results_generator.JSONLayoutResultsGenerator(
            self._port, self._options.builder_name, self._options.build_name,
            self._options.build_number, self._results_directory,
            BUILDER_BASE_URL, individual_test_timings, self._expectations,
            result_summary, self._test_names,
            self._options.test_results_server, "layout-tests",
            self._options.master_name)

        _log.debug("Finished writing JSON files.")

        json_files = [
            "incremental_results.json", "full_results.json", "times_ms.json"
        ]

        generator.upload_json_files(json_files)

        incremental_results_path = self._filesystem.join(
            self._results_directory, "incremental_results.json")

        # Remove these files from the results directory so they don't take up too much space on the buildbot.
        # The tools use the version we uploaded to the results server anyway.
        self._filesystem.remove(times_json_path)
        self._filesystem.remove(incremental_results_path)
开发者ID:kseo,项目名称:webkit,代码行数:53,代码来源:manager.py


示例4: test_test_timings_trie

    def test_test_timings_trie(self):
        individual_test_timings = []
        individual_test_timings.append(json_results_generator.TestResult('foo/bar/baz.html', elapsed_time=1.2))
        individual_test_timings.append(json_results_generator.TestResult('bar.html', elapsed_time=0.0001))
        trie = json_results_generator.test_timings_trie(individual_test_timings)

        expected_trie = {
            'bar.html': 0,
            'foo': {
                'bar': {
                    'baz.html': 1200,
                }
            }
        }

        self.assertEqual(json.dumps(trie), json.dumps(expected_trie))
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:16,代码来源:json_results_generator_unittest.py


示例5: test_test_timings_trie

 def test_test_timings_trie(self):
     test_port = test.TestPort()
     individual_test_timings = []
     individual_test_timings.append(json_results_generator.TestResult('/test.checkout/LayoutTests/foo/bar/baz.html', elapsed_time=1.2))
     individual_test_timings.append(json_results_generator.TestResult('/test.checkout/LayoutTests/bar.html', elapsed_time=0.0001))
     trie = json_results_generator.test_timings_trie(test_port, individual_test_timings)
     
     expected_trie = {
       'bar.html': 0,
       'foo': {
           'bar': {
               'baz.html': 1200,
           }
       }
     }
     
     self.assertEqual(simplejson.dumps(trie), simplejson.dumps(expected_trie))
开发者ID:KDE,项目名称:android-qtwebkit,代码行数:17,代码来源:json_results_generator_unittest.py


示例6: _write_json_files

    def _write_json_files(self, summarized_full_results, summarized_failing_results, initial_results):
        _log.debug("Writing JSON files in %s." % self._results_directory)

        # FIXME: Upload stats.json to the server and delete times_ms.
        times_trie = json_results_generator.test_timings_trie(initial_results.results_by_name.values())
        times_json_path = self._filesystem.join(self._results_directory, "times_ms.json")
        json_results_generator.write_json(self._filesystem, times_trie, times_json_path)

        stats_trie = self._stats_trie(initial_results)
        stats_path = self._filesystem.join(self._results_directory, "stats.json")
        self._filesystem.write_text_file(stats_path, json.dumps(stats_trie))

        full_results_path = self._filesystem.join(self._results_directory, "full_results.json")
        json_results_generator.write_json(self._filesystem, summarized_full_results, full_results_path)

        full_results_path = self._filesystem.join(self._results_directory, "failing_results.json")
        # We write failing_results.json out as jsonp because we need to load it from a file url for results.html and Chromium doesn't allow that.
        json_results_generator.write_json(self._filesystem, summarized_failing_results, full_results_path, callback="ADD_RESULTS")

        _log.debug("Finished writing JSON files.")
开发者ID:Jamesducque,项目名称:mojo,代码行数:20,代码来源:manager.py



注:本文中的webkitpy.layout_tests.layout_package.json_results_generator.test_timings_trie函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python lint_test_expectations.lint函数代码示例发布时间:2022-05-26
下一篇:
Python test_result_writer.TestResultWriter类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap