Changeset 90546 in webkit
- Timestamp:
- Jul 7, 2011 12:25:18 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90545 r90546 1 2011-07-06 Adam Barth <abarth@webkit.org> 2 3 Remove unexpected_results.json 4 https://bugs.webkit.org/show_bug.cgi?id=64065 5 6 Reviewed by Eric Seidel. 7 8 No one should be using this file any more. This patch removes it from 9 the face of the earth. This patch also removes two NRWT-specific 10 command line options that were implemented using 11 unexpected_results.json. 12 13 * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py: 14 * Scripts/webkitpy/layout_tests/controllers/manager.py: 15 * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: 16 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 17 * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: 18 * Scripts/webkitpy/tool/commands/rebaselineserver.py: 19 * Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py: 20 1 21 2011-07-07 Adam Barth <abarth@webkit.org> 2 22 -
trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
r90539 r90546 36 36 class ResultsJSONParserTest(unittest.TestCase): 37 37 # The real files have no whitespace, but newlines make this much more readable. 38 _example_ unexpected_results_json = """ADD_RESULTS({38 _example_full_results_json = """ADD_RESULTS({ 39 39 "tests": { 40 40 "fast": { … … 89 89 test_results.TestResult("fast/dom/prototype-inheritance.html", [test_failures.FailureTextMismatch()], 0), 90 90 ] 91 results = ResultsJSONParser.parse_results_json(self._example_ unexpected_results_json)91 results = ResultsJSONParser.parse_results_json(self._example_full_results_json) 92 92 self.assertEqual(expected_results, results) -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r90532 r90546 302 302 self._worker_states = {} 303 303 304 def collect_tests(self, args , last_unexpected_results):304 def collect_tests(self, args): 305 305 """Find all the files to test. 306 306 307 307 Args: 308 308 args: list of test arguments from the command line 309 last_unexpected_results: list of unexpected results to retest, if any310 309 311 310 """ 312 311 paths = self._strip_test_dir_prefixes(args) 313 paths += last_unexpected_results314 312 if self._options.test_list: 315 313 paths += self._strip_test_dir_prefixes(read_test_files(self._fs, self._options.test_list, self._port.TEST_PATH_SEPARATOR)) … … 912 910 # to appengine server. 913 911 summarized_results = summarize_results(self._port, self._expectations, result_summary, retry_summary, individual_test_timings, only_unexpected=False, interrupted=interrupted) 914 self._upload_json_files( unexpected_results,summarized_results, result_summary, individual_test_timings)912 self._upload_json_files(summarized_results, result_summary, individual_test_timings) 915 913 916 914 # Write the summary to disk (results.html) and display it if requested. … … 1038 1036 return json_layout_results_generator.JSONLayoutResultsGenerator.FAILURE_TO_CHAR[result_enum_value] 1039 1037 1040 def _upload_json_files(self, unexpected_results, summarized_results, result_summary, 1041 individual_test_timings): 1038 def _upload_json_files(self, summarized_results, result_summary, individual_test_timings): 1042 1039 """Writes the results of the test run as JSON files into the results 1043 1040 dir and upload the files to the appengine server. 1044 1041 1045 There are three different files written into the results dir: 1046 unexpected_results.json: A short list of any unexpected results. 1047 This is used by the buildbots to display results. 1042 There are two different files written into the results dir: 1048 1043 expectations.json: This is used by the flakiness dashboard. 1049 1044 results.json: A full list of the results - used by the flakiness … … 1062 1057 times_json_path = self._fs.join(self._results_directory, "times_ms.json") 1063 1058 json_results_generator.write_json(self._fs, times_trie, times_json_path) 1064 1065 unexpected_json_path = self._fs.join(self._results_directory, "unexpected_results.json")1066 json_results_generator.write_json(self._fs, unexpected_results, unexpected_json_path)1067 1059 1068 1060 full_results_path = self._fs.join(self._results_directory, "full_results.json") -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
r90532 r90546 154 154 configure_logging=True) 155 155 manager = LockCheckingManager(port, options, printer) 156 manager.collect_tests(args , [])156 manager.collect_tests(args) 157 157 manager.parse_expectations() 158 158 result_summary = manager.set_up_run() … … 208 208 port = layout_tests.port.get() 209 209 manager = Manager(port, options=MockOptions(test_list=None), printer=Mock()) 210 manager.collect_tests(test_names , last_unexpected_results=[])210 manager.collect_tests(test_names) 211 211 return manager 212 212 -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r90528 r90546 82 82 return 0 83 83 84 last_unexpected_results = _gather_unexpected_results(port)85 if options.print_last_failures:86 printer.write("\n".join(last_unexpected_results) + "\n")87 printer.cleanup()88 return 089 90 84 # We wrap any parts of the run that are slow or likely to raise exceptions 91 85 # in a try/finally to ensure that we clean up the logging configuration. … … 97 91 printer.print_update("Collecting tests ...") 98 92 try: 99 manager.collect_tests(args , last_unexpected_results)93 manager.collect_tests(args) 100 94 except IOError, e: 101 95 if e.errno == errno.ENOENT: … … 166 160 167 161 return warnings 168 169 170 def _gather_unexpected_results(port):171 """Returns the unexpected results from the previous run, if any."""172 filesystem = port._filesystem173 results_directory = port.results_directory()174 options = port._options175 last_unexpected_results = []176 if options.print_last_failures or options.retest_last_failures:177 unexpected_results_filename = filesystem.join(results_directory, "unexpected_results.json")178 if filesystem.exists(unexpected_results_filename):179 results = json_results_generator.load_json(filesystem, unexpected_results_filename)180 resultsjsonparser.for_each_test(results['tests'], lambda test, result: last_unexpected_results.append(test))181 return last_unexpected_results182 162 183 163 … … 410 390 # FIXME: consider: --iterations n 411 391 # Number of times to run the set of tests (e.g. ABCABCABC) 412 optparse.make_option("--print-last-failures", action="store_true",413 default=False, help="Print the tests in the last run that "414 "had unexpected failures (or passes) and then exit."),415 optparse.make_option("--retest-last-failures", action="store_true",416 default=False, help="re-test the tests in the last run that "417 "had unexpected failures (or passes)."),418 392 optparse.make_option("--retry-failures", action="store_true", 419 393 default=True, -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
r90520 r90546 270 270 tests_included=True) 271 271 272 def test_last_results(self):273 fs = unit_test_filesystem()274 # We do a logging run here instead of a passing run in order to275 # suppress the output from the json generator.276 res, buildbot_output, regular_output, user = logging_run(['--clobber-old-results'], record_results=True, filesystem=fs)277 res, buildbot_output, regular_output, user = logging_run(['--print-last-failures'], filesystem=fs)278 self.assertEqual(regular_output.get(), [u'failures/expected/checksum.html\n\n'])279 self.assertEqual(buildbot_output.get(), [])280 281 272 def test_lint_test_files(self): 282 273 res, out, err, user = logging_run(['--lint-test-files']) … … 429 420 record_results=True, 430 421 filesystem=fs) 431 self.assertTrue(fs.read_text_file('/tmp/layout-test-results/ unexpected_results.json').find('{"crash-with-stderr.html":{"expected":"PASS","actual":"CRASH","has_stderr":true}}') != -1)422 self.assertTrue(fs.read_text_file('/tmp/layout-test-results/full_results.json').find('{"crash-with-stderr.html":{"expected":"PASS","actual":"CRASH","has_stderr":true}}') != -1) 432 423 433 424 def test_no_image_failure_with_image_diff(self): … … 439 430 record_results=True, 440 431 filesystem=fs) 441 self.assertTrue(fs.read_text_file('/tmp/layout-test-results/ unexpected_results.json').find('"num_regressions":0') != -1)432 self.assertTrue(fs.read_text_file('/tmp/layout-test-results/full_results.json').find('"num_regressions":0') != -1) 442 433 443 434 def test_crash_log(self): -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
r90542 r90546 81 81 scm = self._tool.scm() 82 82 83 print 'Parsing unexpected_results.json...'83 print 'Parsing full_results.json...' 84 84 results_json_path = filesystem.join(results_directory, 'full_results.json') 85 85 results_json = json_results_generator.load_json(filesystem, results_json_path) -
trunk/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py
r90542 r90546 207 207 208 208 def test_gather_baselines(self): 209 example_json = resultsjsonparser_unittest.ResultsJSONParserTest._example_ unexpected_results_json209 example_json = resultsjsonparser_unittest.ResultsJSONParserTest._example_full_results_json 210 210 results_json = simplejson.loads(strip_json_wrapper(example_json)) 211 211 server = RebaselineServer()
Note: See TracChangeset
for help on using the changeset viewer.