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()