Changeset 90546 in webkit


Ignore:
Timestamp:
Jul 7, 2011 12:25:18 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-07-06 Adam Barth <abarth@webkit.org>

Remove unexpected_results.json
https://bugs.webkit.org/show_bug.cgi?id=64065

Reviewed by Eric Seidel.

No one should be using this file any more. This patch removes it from
the face of the earth. This patch also removes two NRWT-specific
command line options that were implemented using
unexpected_results.json.

  • Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
  • Scripts/webkitpy/layout_tests/controllers/manager.py:
  • Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
  • Scripts/webkitpy/tool/commands/rebaselineserver.py:
  • Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py:
Location:
trunk/Tools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90545 r90546  
     12011-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
    1212011-07-07  Adam Barth  <abarth@webkit.org>
    222
  • trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py

    r90539 r90546  
    3636class ResultsJSONParserTest(unittest.TestCase):
    3737    # 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({
    3939    "tests": {
    4040        "fast": {
     
    8989            test_results.TestResult("fast/dom/prototype-inheritance.html", [test_failures.FailureTextMismatch()], 0),
    9090        ]
    91         results = ResultsJSONParser.parse_results_json(self._example_unexpected_results_json)
     91        results = ResultsJSONParser.parse_results_json(self._example_full_results_json)
    9292        self.assertEqual(expected_results, results)
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r90532 r90546  
    302302        self._worker_states = {}
    303303
    304     def collect_tests(self, args, last_unexpected_results):
     304    def collect_tests(self, args):
    305305        """Find all the files to test.
    306306
    307307        Args:
    308308          args: list of test arguments from the command line
    309           last_unexpected_results: list of unexpected results to retest, if any
    310309
    311310        """
    312311        paths = self._strip_test_dir_prefixes(args)
    313         paths += last_unexpected_results
    314312        if self._options.test_list:
    315313            paths += self._strip_test_dir_prefixes(read_test_files(self._fs, self._options.test_list, self._port.TEST_PATH_SEPARATOR))
     
    912910            # to appengine server.
    913911            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)
    915913
    916914        # Write the summary to disk (results.html) and display it if requested.
     
    10381036        return json_layout_results_generator.JSONLayoutResultsGenerator.FAILURE_TO_CHAR[result_enum_value]
    10391037
    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):
    10421039        """Writes the results of the test run as JSON files into the results
    10431040        dir and upload the files to the appengine server.
    10441041
    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:
    10481043          expectations.json: This is used by the flakiness dashboard.
    10491044          results.json: A full list of the results - used by the flakiness
     
    10621057        times_json_path = self._fs.join(self._results_directory, "times_ms.json")
    10631058        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)
    10671059
    10681060        full_results_path = self._fs.join(self._results_directory, "full_results.json")
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py

    r90532 r90546  
    154154                                   configure_logging=True)
    155155        manager = LockCheckingManager(port, options, printer)
    156         manager.collect_tests(args, [])
     156        manager.collect_tests(args)
    157157        manager.parse_expectations()
    158158        result_summary = manager.set_up_run()
     
    208208            port = layout_tests.port.get()
    209209            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)
    211211            return manager
    212212
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r90528 r90546  
    8282        return 0
    8383
    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 0
    89 
    9084    # We wrap any parts of the run that are slow or likely to raise exceptions
    9185    # in a try/finally to ensure that we clean up the logging configuration.
     
    9791        printer.print_update("Collecting tests ...")
    9892        try:
    99             manager.collect_tests(args, last_unexpected_results)
     93            manager.collect_tests(args)
    10094        except IOError, e:
    10195            if e.errno == errno.ENOENT:
     
    166160
    167161    return warnings
    168 
    169 
    170 def _gather_unexpected_results(port):
    171     """Returns the unexpected results from the previous run, if any."""
    172     filesystem = port._filesystem
    173     results_directory = port.results_directory()
    174     options = port._options
    175     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_results
    182162
    183163
     
    410390        # FIXME: consider: --iterations n
    411391        #      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)."),
    418392        optparse.make_option("--retry-failures", action="store_true",
    419393            default=True,
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

    r90520 r90546  
    270270            tests_included=True)
    271271
    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 to
    275         # 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 
    281272    def test_lint_test_files(self):
    282273        res, out, err, user = logging_run(['--lint-test-files'])
     
    429420            record_results=True,
    430421            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)
    432423
    433424    def test_no_image_failure_with_image_diff(self):
     
    439430            record_results=True,
    440431            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)
    442433
    443434    def test_crash_log(self):
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py

    r90542 r90546  
    8181        scm = self._tool.scm()
    8282
    83         print 'Parsing unexpected_results.json...'
     83        print 'Parsing full_results.json...'
    8484        results_json_path = filesystem.join(results_directory, 'full_results.json')
    8585        results_json = json_results_generator.load_json(filesystem, results_json_path)
  • trunk/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py

    r90542 r90546  
    207207
    208208    def test_gather_baselines(self):
    209         example_json = resultsjsonparser_unittest.ResultsJSONParserTest._example_unexpected_results_json
     209        example_json = resultsjsonparser_unittest.ResultsJSONParserTest._example_full_results_json
    210210        results_json = simplejson.loads(strip_json_wrapper(example_json))
    211211        server = RebaselineServer()
Note: See TracChangeset for help on using the changeset viewer.