Changeset 86063 in webkit


Ignore:
Timestamp:
May 9, 2011 10:32:50 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-09 Alice Boxhall <aboxhall@chromium.org>

Reviewed by Ojan Vafai.

Pull jsonresults_unittest test cases out into separate test methods.
https://bugs.webkit.org/show_bug.cgi?id=60418

  • TestResultServer/model/jsonresults_unittest.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r86049 r86063  
     12011-05-09  Alice Boxhall  <aboxhall@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Pull jsonresults_unittest test cases out into separate test methods.
     6        https://bugs.webkit.org/show_bug.cgi?id=60418
     7
     8        * TestResultServer/model/jsonresults_unittest.py:
     9
    1102011-05-09  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
    211
  • trunk/Tools/TestResultServer/model/jsonresults_unittest.py

    r75234 r86063  
    147147        self.assertEquals(actual_results, expected_results)
    148148
    149     def test(self):
     149    def test_merge_null_incremental_results(self):
    150150        # Empty incremental results json.
    151151        # Nothing to merge.
     
    158158            None)
    159159
     160    def test_merge_empty_incremental_results(self):
    160161        # No actual incremental test results (only prefix and suffix) to merge.
    161162        # Nothing to merge.
     
    168169            None)
    169170
     171    def test_merge_empty_aggregated_results(self):
    170172        # No existing aggregated results.
    171173        # Merged results == new incremental results.
     
    178180            (["2", "1"], [["001.html", "[200,\"F\"]", "[200,0]"]]))
    179181
    180         # Single test for single run.
     182    def test_merge_incremental_single_test_single_run_same_result(self):
    181183        # Incremental results has the latest build and same test results for
    182184        # that run.
    183185        # Insert the incremental results at the first place and sum number
    184         # of runs for "P" (200 + 1) to get merged results.
     186        # of runs for "F" (200 + 1) to get merged results.
    185187        self._test_merge(
    186188            # Aggregated results
     
    191193            (["3", "2", "1"], [["001.html", "[201,\"F\"]", "[201,0]"]]))
    192194
    193         # Single test for single run.
     195    def test_merge_single_test_single_run_different_result(self):
    194196        # Incremental results has the latest build but different test results
    195197        # for that run.
     
    203205            (["3", "2", "1"], [["001.html", "[1,\"I\"],[200,\"F\"]", "[1,1],[200,0]"]]))
    204206
    205         # Single test for single run.
    206         # Incremental results has the latest build but different test results
    207         # for that run.
     207    def test_merge_single_test_single_run_result_changed(self):
     208        # Incremental results has the latest build but results which differ from
     209        # the latest result (but are the same as an older result).
    208210        self._test_merge(
    209211            # Aggregated results
     
    214216            (["3", "2", "1"], [["001.html", "[1,\"I\"],[200,\"F\"],[10,\"I\"]", "[1,1],[200,0],[10,1]"]]))
    215217
    216         # Multiple tests for single run.
     218    def test_merge_multiple_tests_single_run(self):
    217219        # All tests have incremental updates.
    218220        self._test_merge(
     
    224226            (["3", "2", "1"], [["001.html", "[201,\"F\"]", "[201,0]"], ["002.html", "[101,\"I\"]", "[101,1]"]]))
    225227
    226         # Multiple tests for single run.
     228    def test_merge_multiple_tests_single_run_one_no_result(self):
    227229        self._test_merge(
    228230            # Aggregated results
     
    233235            (["3", "2", "1"], [["001.html", "[1,\"N\"],[200,\"F\"]", "[201,0]"], ["002.html", "[101,\"I\"]", "[101,1]"]]))
    234236
    235         # Single test for multiple runs.
     237    def test_merge_single_test_multiple_runs(self):
    236238        self._test_merge(
    237239            # Aggregated results
     
    242244            (["4", "3", "2", "1"], [["001.html", "[2,\"I\"],[200,\"F\"]", "[2,2],[200,0]"]]))
    243245
    244         # Multiple tests for multiple runs.
     246    def test_merge_multiple_tests_multiple_runs(self):
    245247        self._test_merge(
    246248            # Aggregated results
     
    251253            (["4", "3", "2", "1"], [["001.html", "[2,\"I\"],[200,\"F\"]", "[2,2],[200,0]"], ["002.html", "[1,\"C\"],[10,\"Z\"]", "[1,1],[10,0]"]]))
    252254
     255    def test_merge_incremental_result_older_build(self):
    253256        # Test the build in incremental results is older than the most recent
    254257        # build in aggregated results.
     
    262265            None)
    263266
     267    def test_merge_incremental_result_same_build(self):
    264268        # Test the build in incremental results is same as the build in
    265269        # aggregated results.
     
    273277            None)
    274278
     279    def test_merge_remove_test_with_no_data(self):
    275280        # Remove test where there is no data in all runs.
    276281        self._test_merge(
     
    282287            (["3", "2", "1"], [["002.html", "[1,\"P\"],[10,\"F\"]", "[11,0]"]]))
    283288
     289    def test_merge_remove_test_with_all_pass(self):
    284290        # Remove test where all run pass and max running time < 1 seconds
    285291        self._test_merge(
     
    291297            (["3", "2", "1"], [["002.html", "[1,\"P\"],[10,\"F\"]", "[11,0]"]]))
    292298
     299    def test_merge_keep_test_with_all_pass_but_slow_time(self):
    293300        # Do not remove test where all run pass but max running time >= 1 seconds
    294301        self._test_merge(
     
    300307            (["3", "2", "1"], [["001.html", "[201,\"P\"]", "[1,1],[200,0]"], ["002.html", "[1,\"P\"],[10,\"F\"]", "[11,0]"]]))
    301308
     309    def test_merge_prune_extra_results(self):
    302310        # Remove items from test results and times that exceed the max number
    303311        # of builds to track.
     
    311319            (["3", "2", "1"], [["001.html", "[1,\"T\"],[" + max_builds + ",\"F\"]", "[1,1],[" + max_builds + ",0]"]]))
    312320
     321    def test_merge_prune_extra_results_small(self):
    313322        # Remove items from test results and times that exceed the max number
    314323        # of builds to track, using smaller threshold.
     
    323332            int(max_builds))
    324333
     334    def test_merge_prune_extra_results_with_new_result_of_same_type(self):
    325335        # Test that merging in a new result of the same type as the last result
    326336        # causes old results to fall off.
     
    335345            int(max_builds))
    336346
     347    def test_get_test_name_list(self):
    337348        # Get test name list only. Don't include non-test-list data and
    338349        # of test result details.
Note: See TracChangeset for help on using the changeset viewer.