Try to address test failures on the bots.
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 21:54:26 +0000 (21:54 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 21:54:26 +0000 (21:54 +0000)
Allow the test to distinguish between a failure to find the variable, and an error
reporting vector capacity.

* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233330 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/lldb/lldb_webkit_unittest.py

index a533329..fd4718f 100644 (file)
@@ -1,3 +1,14 @@
+2018-06-28  Simon Fraser  <simon.fraser@apple.com>
+
+        Try to address test failures on the bots.
+
+        Allow the test to distinguish between a failure to find the variable, and an error
+        reporting vector capacity.
+
+        * lldb/lldb_webkit_unittest.py:
+        (TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
+        (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
+
 2018-06-28  Lucas Forschler  <lforschler@apple.com>
 
         Add Windows support for WEBKIT_API_KEY.
index e268afd..953020f 100755 (executable)
@@ -142,9 +142,13 @@ class TestSummaryProviders(unittest.TestCase):
     # MARK: WTFVector_SummaryProvider test cases
 
     def serial_test_WTFVectorProvider_empty_vector(self):
-        summary = lldb_webkit.WTFVector_SummaryProvider(self._sbFrame.FindVariable('anEmptyVector'), {})
+        variable = self._sbFrame.FindVariable('anEmptyVector');
+        self.assertIsNotNone(variable)
+        summary = lldb_webkit.WTFVector_SummaryProvider(variable, {})
         self.assertEqual(summary, "{ size = 0, capacity = 0 }")
 
     def serial_test_WTFVectorProvider_vector_size_and_capacity(self):
-        summary = lldb_webkit.WTFVector_SummaryProvider(self._sbFrame.FindVariable('aVectorWithOneItem'), {})
+        variable = self._sbFrame.FindVariable('aVectorWithOneItem');
+        self.assertIsNotNone(variable)
+        summary = lldb_webkit.WTFVector_SummaryProvider(variable, {})
         self.assertEqual(summary, "{ size = 1, capacity = 16 }")