[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

victorw at chromium.org victorw at chromium.org
Wed Dec 22 11:53:15 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2548544b21ef5826e5c7ab168c073581a844ff70
Author: victorw at chromium.org <victorw at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 10 18:39:21 2010 +0000

    2010-08-10  Victor Wang  <victorw at chromium.org>
    
            Reviewed by Ojan Vafai.
    
            Update test results server merge logic so the aggregated
            results and times are updated for tests that are
            in aggragated json but not in incremental json.
    
            Also update unittest to test this case.
    
            https://bugs.webkit.org/show_bug.cgi?id=43769
    
            * TestResultServer/model/jsonresults.py:
            * TestResultServer/model/jsonresults_unittest.py:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65080 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e911169..061c35f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-10  Victor Wang  <victorw at chromium.org>
+
+        Reviewed by Ojan Vafai.
+
+        Update test results server merge logic so the aggregated
+        results and times are updated for tests that are
+        in aggragated json but not in incremental json.
+
+        Also update unittest to test this case.
+
+        https://bugs.webkit.org/show_bug.cgi?id=43769
+
+        * TestResultServer/model/jsonresults.py:
+        * TestResultServer/model/jsonresults_unittest.py:
+
 2010-08-09  Antonio Gomes  <tonikitoo at webkit.org>
 
         Reviewed by Ariya Hidayat.
diff --git a/WebKitTools/TestResultServer/model/jsonresults.py b/WebKitTools/TestResultServer/model/jsonresults.py
index d86fbcd..f8b685e 100755
--- a/WebKitTools/TestResultServer/model/jsonresults.py
+++ b/WebKitTools/TestResultServer/model/jsonresults.py
@@ -171,8 +171,6 @@ class JsonResults(object):
 
             # Merge this build into aggreagated results.
             cls._merge_one_build(aggregated_json, incremental_json, index)
-            logging.debug("Merged build %s, merged json: %s.",
-                build_number, aggregated_json)
 
         return True
 
@@ -210,18 +208,25 @@ class JsonResults(object):
             incremental_json: incremental json object.
         """
 
-        for test_name in incremental_json:
-            incremental_test = incremental_json[test_name]
+        all_tests = (set(aggregated_json.iterkeys()) |
+                     set(incremental_json.iterkeys()))
+        for test_name in all_tests:
             if test_name in aggregated_json:
                 aggregated_test = aggregated_json[test_name]
+                if test_name in incremental_json:
+                    incremental_test = incremental_json[test_name]
+                    results = incremental_test[JSON_RESULTS_RESULTS]
+                    times = incremental_test[JSON_RESULTS_TIMES]
+                else:
+                    results = [[1, "P"]]
+                    times = [[1, "0"]]
+
                 cls._insert_item_run_length_encoded(
-                    incremental_test[JSON_RESULTS_RESULTS],
-                    aggregated_test[JSON_RESULTS_RESULTS])
+                    results, aggregated_test[JSON_RESULTS_RESULTS])
                 cls._insert_item_run_length_encoded(
-                    incremental_test[JSON_RESULTS_TIMES],
-                    aggregated_test[JSON_RESULTS_TIMES])
+                    times, aggregated_test[JSON_RESULTS_TIMES])
             else:
-                aggregated_json[test_name] = incremental_test
+                aggregated_json[test_name] = incremental_json[test_name]
 
     @classmethod
     def _insert_item_run_length_encoded(cls, incremental_item, aggregated_item):
diff --git a/WebKitTools/TestResultServer/model/jsonresults_unittest.py b/WebKitTools/TestResultServer/model/jsonresults_unittest.py
index fd646c8..8cab017 100755
--- a/WebKitTools/TestResultServer/model/jsonresults_unittest.py
+++ b/WebKitTools/TestResultServer/model/jsonresults_unittest.py
@@ -206,11 +206,11 @@ class JsonResultsTest(unittest.TestCase):
         # Not all tests have update.
         self._test_merge(
             # Aggregated results
-            (["2", "1"], [["001.html", "[200,\"P\"]", "[200,\"0\"]"], ["002.html", "[100,\"I\"]", "[100,\"1\"]"]]),
+            (["2", "1"], [["001.html", "[200,\"P\"]", "[200,\"0\"]"], ["002.html", "[100,\"I\"]", "[100,\"1\"]"], ["003.html", "[10,\"F\"]", "[10,\"0\"]"]]),
             # Incremental results
             (["3"], [["002.html", "[1,\"I\"]", "[1,\"1\"]"]]),
             # Expected results
-            (["3", "2", "1"], [["001.html", "[200,\"P\"]", "[200,\"0\"]"], ["002.html", "[101,\"I\"]", "[101,\"1\"]"]]))
+            (["3", "2", "1"], [["001.html", "[201,\"P\"]", "[201,\"0\"]"], ["002.html", "[101,\"I\"]", "[101,\"1\"]"], ["003.html", "[1,\"P\"],[10,\"F\"]", "[11,\"0\"]"]]))
 
         # Single test for multiple runs.
         self._test_merge(

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list