Title: [91515] trunk/Tools
Revision
91515
Author
[email protected]
Date
2011-07-21 15:02:54 -0700 (Thu, 21 Jul 2011)

Log Message

normalize gtest names in the result json
https://bugs.webkit.org/show_bug.cgi?id=64971

Reviewed by Eric Seidel.

This will make the resulting JSON smaller and make the
flakiness dashboard much more sane (e.g. we won't need to
show you the FLAKY_ version and the normal version).

* TestResultServer/model/jsonresults.py:
* TestResultServer/model/jsonresults_unittest.py:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (91514 => 91515)


--- trunk/Tools/ChangeLog	2011-07-21 22:01:07 UTC (rev 91514)
+++ trunk/Tools/ChangeLog	2011-07-21 22:02:54 UTC (rev 91515)
@@ -1,3 +1,17 @@
+2011-07-21  Ojan Vafai  <[email protected]>
+
+        normalize gtest names in the result json
+        https://bugs.webkit.org/show_bug.cgi?id=64971
+
+        Reviewed by Eric Seidel.
+
+        This will make the resulting JSON smaller and make the
+        flakiness dashboard much more sane (e.g. we won't need to
+        show you the FLAKY_ version and the normal version).
+
+        * TestResultServer/model/jsonresults.py:
+        * TestResultServer/model/jsonresults_unittest.py:
+
 2011-07-21  Eric Seidel  <[email protected]>
 
         Unreviewed.  Reenable ORWT for the --leaks bot.

Modified: trunk/Tools/TestResultServer/model/jsonresults.py (91514 => 91515)


--- trunk/Tools/TestResultServer/model/jsonresults.py	2011-07-21 22:01:07 UTC (rev 91514)
+++ trunk/Tools/TestResultServer/model/jsonresults.py	2011-07-21 22:02:54 UTC (rev 91515)
@@ -207,6 +207,18 @@
         return result
 
     @classmethod
+    def _remove_gtest_modifiers(cls, builder, json):
+        tests = json[builder][JSON_RESULTS_TESTS]
+        for name, test in tests.iteritems():
+            new_name = name.replace('.FLAKY_', '.', 1)
+            new_name = new_name.replace('.FAILS_', '.', 1)
+            new_name = new_name.replace('.MAYBE_', '.', 1)
+            new_name = new_name.replace('.DISABLED_', '.', 1)
+            if new_name != name:
+                tests[new_name] = test
+                del tests[name]
+
+    @classmethod
     def _check_json(cls, builder, json):
         version = json[JSON_RESULTS_VERSION_KEY]
         if version > JSON_RESULTS_HIERARCHICAL_VERSION:
@@ -248,6 +260,9 @@
         if not cls._check_json(builder, incremental_json):
             return None
 
+        # FIXME: We should probably avoid doing this for layout tests.
+        cls._remove_gtest_modifiers(builder, incremental_json)
+
         logging.info("Loading existing aggregated json...")
         aggregated_json = cls._load_json(aggregated)
         if not aggregated_json:

Modified: trunk/Tools/TestResultServer/model/jsonresults_unittest.py (91514 => 91515)


--- trunk/Tools/TestResultServer/model/jsonresults_unittest.py	2011-07-21 22:01:07 UTC (rev 91514)
+++ trunk/Tools/TestResultServer/model/jsonresults_unittest.py	2011-07-21 22:02:54 UTC (rev 91515)
@@ -596,5 +596,53 @@
             # Expected results
             ["001.html", "002.html"])
 
+    def test_remove_gtest_modifiers(self):
+        self._test_merge(
+            # Aggregated results
+            {"builds": ["2", "1"],
+             "tests": {"foo.bar": {
+                           "results": "[50,\"F\"]",
+                           "times": "[50,0]"},
+                       "foo.bar2": {
+                           "results": "[100,\"I\"]",
+                           "times": "[100,0]"},
+                       "foo.FAILS_bar3": {
+                           "results": "[100,\"I\"]",
+                           "times": "[100,0]"},
+                       }},
+            # Incremental results
+            {"builds": ["3"],
+             "tests": {"foo.FLAKY_bar": {
+                           "results": "[1,\"F\"]",
+                           "times": "[1,0]"},
+                       "foo.DISABLED_bar2": {
+                           "results": "[1,\"I\"]",
+                           "times": "[1,0]"},
+                       "foo.FAILS_bar3": {
+                           "results": "[1,\"I\"]",
+                           "times": "[1,0]"},
+                       "foo.MAYBE_bar4": {
+                           "results": "[1,\"I\"]",
+                           "times": "[1,0]"}},
+             "version": 4},
+            # Expected results
+            {"builds": ["3", "2", "1"],
+             "tests": {"foo.bar": {
+                           "results": "[51,\"F\"]",
+                           "times": "[51,0]"},
+                       "foo.bar2": {
+                           "results": "[101,\"I\"]",
+                           "times": "[101,0]"},
+                       "foo.bar3": {
+                           "results": "[1,\"I\"]",
+                           "times": "[1,0]"},
+                       "foo.FAILS_bar3": {
+                              "results": "[1,\"N\"],[100,\"I\"]",
+                              "times": "[101,0]"},
+                       "foo.bar4": {
+                           "results": "[1,\"I\"]",
+                           "times": "[1,0]"}},
+             "version": 3})
+
 if __name__ == '__main__':
     unittest.main()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to