RESOLVED FIXED 89437
[GTK] Read fonts path when running layout tests from alternative fonts dir when main dir doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=89437
Summary [GTK] Read fonts path when running layout tests from alternative fonts dir wh...
Carlos Garcia Campos
Reported 2012-06-18 23:50:43 PDT
This would allow to use DRT with the fonts installed in any place.
Attachments
Patch (3.38 KB, patch)
2012-06-18 23:53 PDT, Carlos Garcia Campos
no flags
Updated patch (4.10 KB, patch)
2012-07-02 03:38 PDT, Carlos Garcia Campos
mrobinson: review-
Updated patch (7.23 KB, patch)
2012-07-02 08:49 PDT, Carlos Garcia Campos
mrobinson: review+
Carlos Garcia Campos
Comment 1 2012-06-18 23:53:57 PDT
Philippe Normand
Comment 2 2012-06-20 13:50:58 PDT
Comment on attachment 148267 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=148267&action=review Looks good. Can you please also update the relevant wiki page? Thanks! > Tools/Scripts/webkitpy/layout_tests/port/gtk.py:68 > + if os.environ.get('WEBKIT_TEST_FONTS_PATH'): > + environment['WEBKIT_TEST_FONTS_PATH'] = os.environ['WEBKIT_TEST_FONTS_PATH'] This can be one line environment['WEBKIT_TEST_FONTS_PATH'] = os.environ.get('WEBKIT_TEST_FONTS_PATH','')
Martin Robinson
Comment 3 2012-06-20 13:57:44 PDT
I think Carlos and I agreed that instead of an environment variable we should just look for fonts in an alternate location.
Philippe Normand
Comment 4 2012-06-20 14:00:12 PDT
Oh, ok I didn't know about that. Might have been a good idea to comment on the bug and/or pull the patch out :)
Carlos Garcia Campos
Comment 5 2012-07-02 03:38:23 PDT
Created attachment 150391 [details] Updated patch Use an alternative directory instead of an env var as suggested by Martin.
Martin Robinson
Comment 6 2012-07-02 07:37:48 PDT
Comment on attachment 150391 [details] Updated patch View in context: https://bugs.webkit.org/attachment.cgi?id=150391&action=review This patch looks great, except that it should probably also deal with WebKitTestRunner in Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp. > Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:176 > + const char* webkitOutputDir = g_getenv("WEBKITOUTPUTDIR"); Perhaps you could do: GOwnPtr<char> defaultOutputDir = g_build_filename(getTopLevelPath().data(), "WebKitBuild"); const char* outputDirFromEnvironment = g_getenv("WEBKITOUTPUTDIR"); const char* webkitOutputDir = outputDirFromEnvironment ? outputDirFromEnvironment : topLevelPath.get(); and avoid the duplication below?
Carlos Garcia Campos
Comment 7 2012-07-02 08:49:51 PDT
Created attachment 150430 [details] Updated patch
Martin Robinson
Comment 8 2012-07-02 08:54:17 PDT
Comment on attachment 150430 [details] Updated patch Thanks!
Carlos Garcia Campos
Comment 9 2012-07-02 09:11:08 PDT
Note You need to log in before you can comment on or make changes to this bug.