Summary: | Upload incremental webkit test results json to server | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Victor Wang <victorw> | ||||
Component: | Tools / Tests | Assignee: | Victor Wang <victorw> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ojan | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Victor Wang
2010-08-04 16:27:33 PDT
Created attachment 63510 [details]
Proposed Patch
Comment on attachment 63510 [details] Proposed Patch Looks good. Please make the changes below and feel free to commit. > + # Generate the JSON output file that has full results. > if not self._json: > self._json = self.get_json() > if self._json: > - # Specify separators in order to get compact encoding. > - json_data = simplejson.dumps(self._json, separators=(',', ':')) > - json_string = self.JSON_PREFIX + json_data + self.JSON_SUFFIX > - > - results_file = codecs.open(self._results_file_path, "w", "utf-8") > - results_file.write(json_string) > - results_file.close() > + self._generate_json_file(self._json, self._results_file_path) > + > + # Generate the JSON output file that only has incremental results. > + if self._generate_incremental_results: > + json = self.get_json(incremental=True) > + if json: > + self._generate_json_file( > + json, self._incremental_results_file_path) Once we get all the bots using incremental results, I think we should have setting _generate_incremental_results mean that we don't write out the full results file. Mind putting in a FIXME for that? > + for d in buildinfo[JRG.FIXABLE]: > + for (k, v) in d.iteritems(): > + if k in fixable: > + fixable[k] = fixable[k] + v > + else: > + fixable[k] = v > + for r in test[JRG.RESULTS]: > + if r[1] == JRG.FAIL_RESULT: > + failed = r[0] > + self.assertTrue(failed == 1) > + > + timing = 0 > + for t in test[JRG.TIMES]: > + if t[1] == test_timings[test_name]: > + timing = t[0] > + self.assertTrue(timing == 1) For readability sake, abbreviated variable names are discouraged in WebKit code (i.e. for d, k, v, r and t). Committed r64786: <http://trac.webkit.org/changeset/64786> |