Title: [105199] trunk/Tools
Revision
105199
Author
[email protected]
Date
2012-01-17 15:10:46 -0800 (Tue, 17 Jan 2012)

Log Message

webkitpy: fix json import on linux
https://bugs.webkit.org/show_bug.cgi?id=76481

Reviewed by Adam Barth.

For some reason, the version of simplejson autoinstalled on my linux
box seems to be broken. We should really only be using
simplejson if json isn't available anyway, so this change looks
for json first.

* Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
(JSONGeneratorTest.test_test_timings_trie):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (105198 => 105199)


--- trunk/Tools/ChangeLog	2012-01-17 23:04:02 UTC (rev 105198)
+++ trunk/Tools/ChangeLog	2012-01-17 23:10:46 UTC (rev 105199)
@@ -1,5 +1,20 @@
 2012-01-17  Dirk Pranke  <[email protected]>
 
+        webkitpy: fix json import on linux
+        https://bugs.webkit.org/show_bug.cgi?id=76481
+
+        Reviewed by Adam Barth.
+
+        For some reason, the version of simplejson autoinstalled on my linux
+        box seems to be broken. We should really only be using
+        simplejson if json isn't available anyway, so this change looks
+        for json first.
+
+        * Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
+        (JSONGeneratorTest.test_test_timings_trie):
+
+2012-01-17  Dirk Pranke  <[email protected]>
+
         Fix failures in test-webkitpy caused by r105177.
 
         Unreviewed, build fix.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py (105198 => 105199)


--- trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py	2012-01-17 23:04:02 UTC (rev 105198)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py	2012-01-17 23:10:46 UTC (rev 105199)
@@ -37,8 +37,12 @@
 from webkitpy.layout_tests.models import test_expectations
 from webkitpy.layout_tests.port import test
 from webkitpy.thirdparty.mock import Mock
-from webkitpy.thirdparty import simplejson
 
+try:
+    import json
+except ImportError, e:
+    from webkitpy.thirdparty import simplejson as json
+
 class JSONGeneratorTest(unittest.TestCase):
     def setUp(self):
         self.builder_name = 'DUMMY_BUILDER_NAME'
@@ -229,9 +233,8 @@
           }
         }
 
-        self.assertEqual(simplejson.dumps(trie), simplejson.dumps(expected_trie))
+        self.assertEqual(json.dumps(trie), json.dumps(expected_trie))
 
 
-
 if __name__ == '__main__':
     unittest.main()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to