Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1350)

Unified Diff: content/test/gpu/run_gpu_test

Issue 42913002: Try to work around bug in glib by ensuring DBUS_SESSION_BUS_ADDRESS is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/run_gpu_test
diff --git a/content/test/gpu/run_gpu_test b/content/test/gpu/run_gpu_test
index 204e455e5f0230001467916011e19aba390dc7df..15ad43686ab2d6d0e8c98e7e5cd2bd2ea583cef3 100755
--- a/content/test/gpu/run_gpu_test
+++ b/content/test/gpu/run_gpu_test
@@ -5,10 +5,28 @@
import os
import sys
+def _DoDBusWorkaround():
+ # Attempt to work around bug in GLib by getting DBus session bus
+ # address early. crbug.com/309093
+ import platform
+ import re
+ import subprocess
+ if (platform.uname()[0].lower() == 'linux' and
+ 'DBUS_SESSION_BUS_ADDRESS' not in os.environ):
+ try:
+ dbus_output = subprocess.check_output(['dbus-launch']).split('\n')
+ for line in dbus_output:
+ m = re.match(r"([^=]+)\=(.+)", line)
+ if m:
+ os.environ[m.group(1)] = m.group(2)
+ except:
+ pass
+
sys.path.append(os.path.join(os.path.dirname(__file__),
os.pardir, os.pardir, os.pardir, 'tools', 'telemetry'))
from telemetry import test_runner
if __name__ == '__main__':
+ _DoDBusWorkaround()
sys.exit(test_runner.Main())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698