summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2019-08-31 04:12:44 +0300
committerSam Thursfield <sam@afuera.me.uk>2019-09-14 12:09:19 +0200
commit072ad286680b10a63babd4e69e8d2e85eb6de2c3 (patch)
tree81471f16d1c18ed7f0a81c74c802fd90c8000b61 /utils
parent5c60dc4499965ea3fcb0f764ef1bae82acb94e18 (diff)
downloadtracker-072ad286680b10a63babd4e69e8d2e85eb6de2c3.tar.gz
utils/sandbox: Add --dbus-config option
This allows tracker-sandbox to be used as a test runner for when the daemons are not yet installed.
Diffstat (limited to 'utils')
-rwxr-xr-xutils/sandbox/tracker-sandbox.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/sandbox/tracker-sandbox.py b/utils/sandbox/tracker-sandbox.py
index 34ad09ed5..687e2c48c 100755
--- a/utils/sandbox/tracker-sandbox.py
+++ b/utils/sandbox/tracker-sandbox.py
@@ -117,7 +117,7 @@ def environment_set_and_add_path(env, prefix, suffix):
os.environ[env] = full
-def environment_set(index_location, prefix, verbosity=0):
+def environment_set(index_location, prefix, verbosity=0, dbus_config=None):
# Environment
index_location = os.path.abspath(index_location)
prefix = os.path.abspath(os.path.expanduser(prefix))
@@ -152,7 +152,7 @@ def environment_set(index_location, prefix, verbosity=0):
os.environ['XDG_RUNTIME_DIR'], 'dbus-session')
dbus = trackertestutils.dbusdaemon.DBusDaemon(dbus_session_file)
- dbus.start_if_needed()
+ dbus.start_if_needed(config_file=dbus_config)
# Important, other subprocesses must use our new bus
os.environ['DBUS_SESSION_BUS_ADDRESS'] = dbus.get_address()
@@ -238,6 +238,8 @@ def argument_parser():
"only show messages logged by Tracker daemons.")
parser.add_argument('--debug-sandbox', action='store_true',
help="show debugging info from tracker-sandbox")
+ parser.add_argument('--dbus-config', metavar='FILE',
+ help="use a custom config file for the private D-Bus daemon")
parser.add_argument('-v', '--verbosity', default='0',
choices=['0', '1', '2', '3', 'errors', 'minimal', 'detailed', 'debug'],
help="show debugging info from Tracker processes")
@@ -297,7 +299,7 @@ if __name__ == "__main__":
verbosity = verbosity_as_int(args.verbosity)
# Set up environment variables and foo needed to get started.
- dbus = environment_set(args.index_location, args.prefix, verbosity)
+ dbus = environment_set(args.index_location, args.prefix, verbosity, dbus_config=args.dbus_config)
config_set()
link_to_mime_data()