Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

Issue 20830003: Get rid of the distinction between modifiers and expectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: clean up a couple things Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 should_add_missing_baselines=(self._options.new_test_results and not self._test_is_expected_missing(test_file))) 132 should_add_missing_baselines=(self._options.new_test_results and not self._test_is_expected_missing(test_file)))
133 133
134 def _test_requires_lock(self, test_file): 134 def _test_requires_lock(self, test_file):
135 """Return True if the test needs to be locked when 135 """Return True if the test needs to be locked when
136 running multiple copies of NRWTs. Perf tests are locked 136 running multiple copies of NRWTs. Perf tests are locked
137 because heavy load caused by running other tests in parallel 137 because heavy load caused by running other tests in parallel
138 might cause some of them to timeout.""" 138 might cause some of them to timeout."""
139 return self._is_http_test(test_file) or self._is_perf_test(test_file) 139 return self._is_http_test(test_file) or self._is_perf_test(test_file)
140 140
141 def _test_is_expected_missing(self, test_file): 141 def _test_is_expected_missing(self, test_file):
142 return (self._expectations.model().has_keyword(test_file, test_expectati ons.MISSING_KEYWORD) 142 expectations = self._expectations.model().get_expectations(test_file)
143 or self._expectations.model().has_keyword(test_file, test_expectatio ns.NEEDS_REBASELINE_KEYWORD) 143 return test_expectations.MISSING in expectations or test_expectations.NE EDS_REBASELINE in expectations or test_expectations.NEEDS_MANUAL_REBASELINE in e xpectations
Dirk Pranke 2013/07/26 23:07:28 Nit: Maybe push this into TetsExpectationsLine.is_
144 or self._expectations.model().has_keyword(test_file, test_expectatio ns.NEEDS_MANUAL_REBASELINE_KEYWORD))
145 144
146 def _test_is_slow(self, test_file): 145 def _test_is_slow(self, test_file):
147 return self._expectations.has_modifier(test_file, test_expectations.SLOW ) 146 return test_expectations.SLOW in self._expectations.model().get_expectat ions(test_file)
Dirk Pranke 2013/07/26 23:07:28 Nit: maybe push this into TestExpectationsLine.tes
148 147
149 def needs_servers(self, test_names): 148 def needs_servers(self, test_names):
150 return any(self._test_requires_lock(test_name) for test_name in test_nam es) 149 return any(self._test_requires_lock(test_name) for test_name in test_nam es)
151 150
152 def _set_up_run(self, test_names): 151 def _set_up_run(self, test_names):
153 self._printer.write_update("Checking build ...") 152 self._printer.write_update("Checking build ...")
154 if not self._port.check_build(self.needs_servers(test_names)): 153 if not self._port.check_build(self.needs_servers(test_names)):
155 _log.error("Build check failed") 154 _log.error("Build check failed")
156 return False 155 return False
157 156
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 return int(worker_name.split('/')[1]) if worker_name else -1 418 return int(worker_name.split('/')[1]) if worker_name else -1
420 419
421 stats = {} 420 stats = {}
422 for result in initial_results.results_by_name.values(): 421 for result in initial_results.results_by_name.values():
423 if result.type != test_expectations.SKIP: 422 if result.type != test_expectations.SKIP:
424 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int (result.total_run_time * 1000))} 423 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int (result.total_run_time * 1000))}
425 stats_trie = {} 424 stats_trie = {}
426 for name, value in stats.iteritems(): 425 for name, value in stats.iteritems():
427 json_results_generator.add_path_to_trie(name, value, stats_trie) 426 json_results_generator.add_path_to_trie(name, value, stats_trie)
428 return stats_trie 427 return stats_trie
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698