Summary: | [GTK] Read fonts path when running layout tests from alternative fonts dir when main dir doesn't exist | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||||||
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, dpranke, gustavo, mrobinson, ojan, pnormand, webkit.review.bot | ||||||||
Priority: | P2 | Keywords: | Gtk | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
Attachments: |
|
Description
Carlos Garcia Campos
2012-06-18 23:50:43 PDT
Created attachment 148267 [details]
Patch
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','') I think Carlos and I agreed that instead of an environment variable we should just look for fonts in an alternate location. 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 :) Created attachment 150391 [details]
Updated patch
Use an alternative directory instead of an env var as suggested by Martin.
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? Created attachment 150430 [details]
Updated patch
Comment on attachment 150430 [details]
Updated patch
Thanks!
Committed r121684: <http://trac.webkit.org/changeset/121684> |