[Qt][WK2] run-webkit-tests --qt crashes if WEBKIT_TESTFONTS is not set
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 10:37:14 +0000 (10:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 10:37:14 +0000 (10:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77466

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2012-02-01
Reviewed by Kenneth Rohde Christiansen.

Replicate the behavior of old-run-webkit-tests and check if WEBKIT_TESTFONTS
is set or if we should raise an error.

* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort.setup_environ_for_server):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/qt.py

index 1c67675..b2255c2 100644 (file)
@@ -1,3 +1,16 @@
+2012-02-01  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
+
+        [Qt][WK2] run-webkit-tests --qt  crashes if WEBKIT_TESTFONTS is not set
+        https://bugs.webkit.org/show_bug.cgi?id=77466
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Replicate the behavior of old-run-webkit-tests and check if WEBKIT_TESTFONTS
+        is set or if we should raise an error.
+
+        * Scripts/webkitpy/layout_tests/port/qt.py:
+        (QtPort.setup_environ_for_server):
+
 2012-02-01  Philippe Normand  <pnormand@igalia.com> and Sergio Villar Senin  <svillar@igalia.com>
 
         Reviewed by Martin Robinson.
index 2445876..79c3585 100644 (file)
@@ -31,6 +31,7 @@
 import logging
 import re
 import sys
+import os
 
 import webkit
 
@@ -132,6 +133,11 @@ class QtPort(WebKitPort):
         return None
 
     def setup_environ_for_server(self, server_name=None):
+        if not 'WEBKIT_TESTFONTS' in os.environ:
+            print "\n\nThe WEBKIT_TESTFONTS environment variable is not defined or not set properly"
+            print "You must set it before running the tests."
+            print "Use git to grab the actual fonts from http://gitorious.org/qtwebkit/testfonts\n"
+            sys.exit(1)
         clean_env = WebKitPort.setup_environ_for_server(self, server_name)
         clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
         self._copy_value_from_environ_if_set(clean_env, 'QT_DRT_WEBVIEW_MODE')