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

Side by Side Diff: content/test/gpu/run_gpu_test

Issue 46183003: Remove dbus-launch workaround now that it's been propagated to runtest.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 import os 5 import os
6 import sys 6 import sys
7 7
8 def _DoDBusWorkaround():
9 # Attempt to work around bug in GLib by getting DBus session bus
10 # address early. crbug.com/309093
11 import platform
12 import re
13 import subprocess
14 if (platform.uname()[0].lower() == 'linux' and
15 'DBUS_SESSION_BUS_ADDRESS' not in os.environ):
16 try:
17 dbus_output = subprocess.check_output(['dbus-launch']).split('\n')
18 for line in dbus_output:
19 m = re.match(r"([^=]+)\=(.+)", line)
20 if m:
21 os.environ[m.group(1)] = m.group(2)
22 except:
23 pass
24
25 sys.path.append(os.path.join(os.path.dirname(__file__), 8 sys.path.append(os.path.join(os.path.dirname(__file__),
26 os.pardir, os.pardir, os.pardir, 'tools', 'telemetry')) 9 os.pardir, os.pardir, os.pardir, 'tools', 'telemetry'))
27 10
28 from telemetry import test_runner 11 from telemetry import test_runner
29 12
30 if __name__ == '__main__': 13 if __name__ == '__main__':
31 _DoDBusWorkaround()
32 sys.exit(test_runner.Main()) 14 sys.exit(test_runner.Main())
OLDNEW
« 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