OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 ''' | 3 ''' |
4 Copyright 2012 Google Inc. | 4 Copyright 2012 Google Inc. |
5 | 5 |
6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 7 found in the LICENSE file. |
8 ''' | 8 ''' |
9 | 9 |
10 ''' | 10 ''' |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 outfilename=outfilename) | 270 outfilename=outfilename) |
271 | 271 |
272 # Rebaseline all platforms/tests/types we specified in the constructor. | 272 # Rebaseline all platforms/tests/types we specified in the constructor. |
273 def RebaselineAll(self): | 273 def RebaselineAll(self): |
274 for subdir in self._subdirs: | 274 for subdir in self._subdirs: |
275 if not subdir in SUBDIR_MAPPING.keys(): | 275 if not subdir in SUBDIR_MAPPING.keys(): |
276 raise Exception(('unrecognized platform subdir "%s"; ' + | 276 raise Exception(('unrecognized platform subdir "%s"; ' + |
277 'should be one of %s') % ( | 277 'should be one of %s') % ( |
278 subdir, SUBDIR_MAPPING.keys())) | 278 subdir, SUBDIR_MAPPING.keys())) |
279 builder_name = SUBDIR_MAPPING[subdir] | 279 builder_name = SUBDIR_MAPPING[subdir] |
| 280 json_url = '/'.join([self._json_base_url, |
| 281 subdir, builder_name, subdir, |
| 282 self._json_filename]) |
| 283 |
280 if self._tests: | 284 if self._tests: |
281 for test in self._tests: | 285 for test in self._tests: |
282 self._RebaselineOneTest(expectations_subdir=subdir, | 286 self._RebaselineOneTest(expectations_subdir=subdir, |
283 builder_name=builder_name, | 287 builder_name=builder_name, |
284 test=test) | 288 test=test) |
285 else: # get the raw list of files that need rebaselining from JSON | 289 else: # get the raw list of files that need rebaselining from JSON |
286 json_url = '/'.join([self._json_base_url, | |
287 subdir, builder_name, subdir, | |
288 self._json_filename]) | |
289 filenames = self._GetFilesToRebaseline(json_url=json_url, | 290 filenames = self._GetFilesToRebaseline(json_url=json_url, |
290 add_new=self._add_new) | 291 add_new=self._add_new) |
291 for filename in filenames: | 292 for filename in filenames: |
292 outfilename = os.path.join(subdir, filename); | 293 outfilename = os.path.join(subdir, filename); |
293 self._RebaselineOneFile(expectations_subdir=subdir, | 294 self._RebaselineOneFile(expectations_subdir=subdir, |
294 builder_name=builder_name, | 295 builder_name=builder_name, |
295 infilename=filename, | 296 infilename=filename, |
296 outfilename=outfilename) | 297 outfilename=outfilename) |
297 | 298 |
298 # main... | 299 # main... |
(...skipping 30 matching lines...) Expand all Loading... |
329 '"--tests aaclip bigmatrix"; if unspecified, then all ' + | 330 '"--tests aaclip bigmatrix"; if unspecified, then all ' + |
330 'failing tests (according to the actual-results.json ' + | 331 'failing tests (according to the actual-results.json ' + |
331 'file) will be rebaselined.') | 332 'file) will be rebaselined.') |
332 args = parser.parse_args() | 333 args = parser.parse_args() |
333 rebaseliner = Rebaseliner(tests=args.tests, configs=args.configs, | 334 rebaseliner = Rebaseliner(tests=args.tests, configs=args.configs, |
334 subdirs=args.subdirs, dry_run=args.dry_run, | 335 subdirs=args.subdirs, dry_run=args.dry_run, |
335 json_base_url=args.json_base_url, | 336 json_base_url=args.json_base_url, |
336 json_filename=args.json_filename, | 337 json_filename=args.json_filename, |
337 add_new=args.add_new) | 338 add_new=args.add_new) |
338 rebaseliner.RebaselineAll() | 339 rebaseliner.RebaselineAll() |
OLD | NEW |