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
4 # found in the LICENSE file.
8 def _DoDBusWorkaround():
9 # Attempt to work around bug in GLib by getting DBus session bus
10 # address early. crbug.com/309093
14 if (platform
.uname()[0].lower() == 'linux' and
15 'DBUS_SESSION_BUS_ADDRESS' not in os
.environ
):
17 dbus_output
= subprocess
.check_output(['dbus-launch']).split('\n')
18 for line
in dbus_output
:
19 m
= re
.match(r
"([^=]+)\=(.+)", line
)
21 os
.environ
[m
.group(1)] = m
.group(2)
25 sys
.path
.append(os
.path
.join(os
.path
.dirname(__file__
),
26 os
.pardir
, os
.pardir
, os
.pardir
, 'tools', 'telemetry'))
28 from telemetry
import test_runner
30 if __name__
== '__main__':
32 sys
.exit(test_runner
.Main())