Home | History | Annotate | Download | only in model

Lines Matching refs:json

35 JSON_RESULTS_FILE = "results.json"
36 JSON_RESULTS_FILE_SMALL = "results-small.json"
55 """Strip out prefix and suffix of json results string.
58 data: json file content.
61 json string without prefix and suffix.
71 def _generate_file_data(cls, json, sort_keys=False):
72 """Given json string, generate file content data by adding
76 json: json string without prefix and suffix.
79 json file data.
82 data = simplejson.dumps(json, separators=(',', ':'),
88 """Load json file to a python object.
91 file_data: json file content.
94 json object or
100 logging.warning("No json results data.")
107 logging.error("Failed to load json results: %s", str(err))
112 """Merge incremental json into aggregated json results.
115 aggregated_json: aggregated json object.
116 incremental_json: incremental json object.
139 """Merge incremental non tests property data into aggregated json results.
142 aggregated_json: aggregated json object.
143 incremental_json: incremental json object.
157 logging.debug("Merging build %s, incremental json index: %d.",
160 # Return if not all build numbers in the incremental json results
164 logging.warning(("Build %d in incremental json is older than "
175 logging.warning("Duplicate build %d in incremental json",
187 """Merge one build of incremental json into aggregated json results.
190 aggregated_json: aggregated json object.
191 incremental_json: incremental json object.
192 incremental_index: index of the incremental json results to merge.
197 # Merge json results except "tests" properties (results, times etc).
215 aggregated_json: aggregated json object.
216 incremental_json: incremental json object.
266 aggregated_json: The JSON object with all the test results for
322 def _check_json(cls, builder, json):
323 """Check whether the given json is valid.
326 builder: builder name this json is for.
327 json: json object to check.
330 True if the json is valid or
334 version = json[JSON_RESULTS_VERSION_KEY]
336 logging.error("Results JSON version '%s' is not supported.",
340 if not builder in json:
341 logging.error("Builder '%s' is not in json results.", builder)
344 results_for_builder = json[builder]
346 logging.error("Missing build number in json results.")
353 """Merge incremental json file data with aggregated json file data.
357 aggregated: aggregated json file data.
358 incremental: incremental json file data.
359 sort_key: whether or not to sort key when dumping json results.
362 Merged json file data if merge succeeds or
370 logging.info("Loading incremental json...")
375 logging.info("Checking incremental json...")
379 logging.info("Loading existing aggregated json...")
384 logging.info("Checking existing aggregated json...")
388 logging.info("Merging json results...")
393 logging.error("Failed to merge json results: %s", str(err))
402 """Update datastore json file data by merging it with incremental json
410 incremental: incremental json file data to merge.
435 logging.info("No existing json results, incremental json is saved.")
447 """Get list of test names from aggregated json file data.
450 json_file_data: json file data that has all test-data and
454 json file with test name list only. The json format is the same
459 logging.debug("Loading test results json...")
460 json = cls._load_json(json_file_data)
461 if not json:
464 logging.debug("Checking test results json...")
465 if not cls._check_json(builder, json):
469 tests = json[builder][JSON_RESULTS_TESTS]