fix: add executable to ChromeDriver's rpath for electron 8+ (#21961)

* fix: no error messages?

* Revert "fix: no error messages?"

This reverts commit 14a1078493ae67ed63f51a88656a948b2a3c0499.

* fix: add executable to chromedriver's rpath for electron 8+
This commit is contained in:
Erick Zhao 2020-01-29 16:40:09 -08:00 committed by GitHub
parent 0979bfc9c1
commit 2a47300d61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 0 deletions

View file

@ -80,3 +80,4 @@ add_trustedauthclient_to_urlloaderfactory.patch
feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch
accessible_pane_view.patch
fixme_grit_conflicts.patch
fix_add_executable_to_chromedriver_s_rpath_for_electron_8.patch

View file

@ -0,0 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Erick Zhao <ezhao@slack-corp.com>
Date: Wed, 29 Jan 2020 14:21:15 -0800
Subject: fix: add executable to chromedriver's rpath for electron 8+
Chromedriver errors on startup for Electron 8+ because FFmpeg
is not included. Adding the executable path to rpath fixes the
issue.
This is in patch form rather than copying the executable command
in Electron's BUILD.gn because one of Chromedriver's deps
(//net/server:http_server) hsa a visibility list that Electron
is not on.
diff --git a/chrome/test/chromedriver/BUILD.gn b/chrome/test/chromedriver/BUILD.gn
index 1ce029a1ba3ec9da3527008d8c2b38446ab4b2f3..de2cc3074fef3d75f041ec8230bd18d3827192cc 100644
--- a/chrome/test/chromedriver/BUILD.gn
+++ b/chrome/test/chromedriver/BUILD.gn
@@ -330,6 +330,13 @@ executable("chromedriver") {
"//net/traffic_annotation:test_support",
"//services/network/public/mojom",
]
+ # Fixes bad rpath on Electron 8+
+ if (is_mac) {
+ ldflags = [
+ "-rpath",
+ "@executable_path/.",
+ ]
+ }
}
python_library("chromedriver_py_tests") {