Changeset 107273 in webkit
- Timestamp:
- Feb 9, 2012 12:18:48 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r107271 r107273 1 2012-02-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 3 [Qt][WK2] run-webkit-tests --qt crashes if WEBKIT_TESTFONTS is not set 4 https://bugs.webkit.org/show_bug.cgi?id=77466 5 6 Reviewed by Dirk Pranke. 7 8 Replicate the behavior of old-run-webkit-tests and check if WEBKIT_TESTFONTS 9 is set or if we should raise an error. A unit test was added. 10 11 * Scripts/webkitpy/layout_tests/port/qt.py: 12 (QtPort.operating_system): 13 (QtPort): 14 (QtPort.check_sys_deps): 15 * Scripts/webkitpy/layout_tests/port/qt_unittest.py: 16 (QtPortTest.test_operating_system): 17 (QtPortTest): 18 (QtPortTest.test_check_sys_deps): 19 1 20 2012-02-09 Eric Seidel <eric@webkit.org> 2 21 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py
r106466 r107273 32 32 import re 33 33 import sys 34 import os 34 35 35 36 import webkit … … 149 150 def operating_system(self): 150 151 return self._operating_system 152 153 def check_sys_deps(self, needs_http): 154 result = super(QtPort, self).check_sys_deps(needs_http) 155 if not 'WEBKIT_TESTFONTS' in os.environ: 156 _log.error('\nThe WEBKIT_TESTFONTS environment variable is not defined or not set properly.') 157 _log.error('You must set it before running the tests.') 158 _log.error('Use git to grab the actual fonts from http://gitorious.org/qtwebkit/testfonts') 159 return False 160 return result -
trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py
r104843 r107273 28 28 29 29 import unittest 30 import os 30 31 31 32 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2 … … 87 88 self.assertEqual('mac', self.make_port(os_name='mac').operating_system()) 88 89 self.assertEqual('win', self.make_port(port_name='qt-win', os_name='win').operating_system()) 90 91 def test_check_sys_deps(self): 92 port = self.make_port() 93 94 # Success 95 os.environ['WEBKIT_TESTFONTS'] = '/tmp/foo' 96 port._executive = MockExecutive2(exit_code=0) 97 self.assertTrue(port.check_sys_deps(needs_http=False)) 98 99 # Failure 100 del os.environ['WEBKIT_TESTFONTS'] 101 port._executive = MockExecutive2(exit_code=1, 102 output='testing output failure') 103 self.assertFalse(port.check_sys_deps(needs_http=False))
Note: See TracChangeset
for help on using the changeset viewer.