[webkit-changes] [WebKit/WebKit] d8bd04: REGRESSION(265294 at main): [GTK][WPE] WTR is unable ...
Carlos Alberto Lopez Perez
noreply at github.com
Thu Dec 12 05:10:29 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d8bd0466a81546c95ef998cf3847241e47aa9cda
https://github.com/WebKit/WebKit/commit/d8bd0466a81546c95ef998cf3847241e47aa9cda
Author: Carlos Alberto Lopez Perez <clopez at igalia.com>
Date: 2024-12-12 (Thu, 12 Dec 2024)
Changed paths:
M Source/WTF/wtf/FileSystem.h
M Source/WTF/wtf/glib/FileSystemGlib.cpp
M Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp
M Tools/Scripts/webkitpy/port/glib.py
M Tools/Scripts/webkitpy/port/gtk_unittest.py
A Tools/WebKitTestRunner/InjectedBundle/glib/ActivateFontsGlib.cpp
R Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp
M Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp
R Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp
R Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h
M Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp
R Tools/WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp
M Tools/WebKitTestRunner/InjectedBundle/wpe/InjectedBundleWPE.cpp
M Tools/WebKitTestRunner/PlatformGTK.cmake
M Tools/WebKitTestRunner/PlatformWPE.cmake
Log Message:
-----------
REGRESSION(265294 at main): [GTK][WPE] WTR is unable to find the fonts.conf file if the top-level compile-time and run-time directories are different
https://bugs.webkit.org/show_bug.cgi?id=284502
Reviewed by Carlos Garcia Campos.
Since 265294 at main the path to the fonts.conf file is built as an absolute path,
using TOP_LEVEL_DIR as base path, but TOP_LEVEL_DIR is a compile-time definition.
So if we try to run the tests on a different directory where TOP_LEVEL_DIR changes
(without recompiling) then we run into problems.
This happens, for example, on the bots that use different home dirs and were one
bot builds-only and the other downloads that built-product to run tests with it
on a different home directory.
With Flapak SDK this problem does not happen because the tests run inside the Flatpak
environment that bind-mounts the webkit dir into the /app directory, so in that case
the directory remains the same.
After this patch the value of the top lovel directory is defined as follows (by order):
1. first set it on the python tooling getting the value at run-time, 2. if that is not
present then try to use the value that was defined at compile-time but only if that value
points to an existent directory, 3. otherwise try to derive the value from the current
path on disk of the running executable.
Meanwhile at this, seize to eliminate related duplicated code.
* Source/WTF/wtf/FileSystem.h:
* Source/WTF/wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::webkitTopLevelDirectory):
* Source/WebCore/platform/text/hyphen/HyphenationLibHyphen.cpp:
(WebCore::webkitBuildDirectory):
(WebCore::topLevelPath): Deleted.
* Tools/Scripts/webkitpy/port/glib.py:
(GLibPort.setup_environ_for_server):
(GLibPort.setup_environ_for_minibrowser):
* Tools/Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_show_results_html_file):
* Tools/WebKitTestRunner/InjectedBundle/glib/ActivateFontsGlib.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp.
(WTR::activateFonts):
(WTR::installFakeHelvetica):
(WTR::uninstallFakeHelvetica):
* Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp: Removed.
* Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WTR::InjectedBundle::platformInitialize):
* Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp: Removed.
* Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h: Removed.
* Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::pathToLocalResource):
* Tools/WebKitTestRunner/InjectedBundle/wpe/InjectedBundleWPE.cpp:
(WTR::InjectedBundle::platformInitialize):
* Tools/WebKitTestRunner/PlatformGTK.cmake:
* Tools/WebKitTestRunner/PlatformWPE.cmake:
Canonical link: https://commits.webkit.org/287735@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list