本文整理汇总了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;未经允许,请勿转载。 |
请发表评论