aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-01-24 13:12:05 +0100
committerGitHub <noreply@github.com>2024-01-24 12:12:05 +0000
commitaf6652fc098fee10cdf4d2ad67648e7d813f1ec8 (patch)
tree40330642a1c62b28d8b4622dba6672c96954d825 /python/servo/command_base.py
parenteb95703325aeb48d5f56a8da5b258bad608dd632 (diff)
downloadservo-af6652fc098fee10cdf4d2ad67648e7d813f1ec8.tar.gz
servo-af6652fc098fee10cdf4d2ad67648e7d813f1ec8.zip
tests: Add GStreamer library directory to DYLD_LIBRARY_PATH (#31163)
This fixes an issue where the dylib for harfbuzz cannot be found when running unit tests on some systems, because unit tests don't get their rpaths adjusted during build. This is quite likely an issue with dylib dependency management. We just need a bit more exploration of how this is traditionally handled.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 833f0bac417..b839f4d1dc4 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -488,6 +488,12 @@ class CommandBase(object):
if gstreamer_root:
util.prepend_paths_to_env(env, "PATH", os.path.join(gstreamer_root, "bin"))
+ # FIXME: This is necessary to run unit tests, because they depend on dylibs from the
+ # GStreamer distribution (such as harfbuzz), but we only modify the rpath of the
+ # target binary (servoshell / libsimpleservo).
+ if platform.is_macos:
+ util.prepend_paths_to_env(env, "DYLD_LIBRARY_PATH", os.path.join(gstreamer_root, "lib"))
+
effective_target = self.cross_compile_target or servo.platform.host_triple()
if "msvc" in effective_target:
# Always build harfbuzz from source