summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* trackertestutils: Fix possible race condition in DBus shutdownCarlos Garnacho2021-02-201-3/+3
| | | | | | | | When stopping the DBus service, we don't unset the SIGTERM handler that tries to stop the DBus service. This results in race conditions around subprocess.wait(). Remove first the handler, then terminate.
* examples: Add endpoint exampleSam Thursfield2020-12-171-0/+2
|
* trackertestutils: Fix DBus logging outputSam Thursfield2020-08-241-2/+2
| | | | | | | I changed the name of the logger in https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/254. This updates tracker-sandbox accordingly so that log messages from the DBus daemons appear on stdout by default.
* testutils: Print URN in debugCarlos Garnacho2020-07-031-1/+1
| | | | We now got it at hand, and it's useful for debug.
* trackertestutils: Use TrackerSparqlStatement for some queriesSam Thursfield2020-06-211-28/+34
|
* libtracker-sparql: Drop priority argument from sync functionsCarlos Garnacho2020-06-192-2/+1
| | | | Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/218
* libtracker-sparql: Drop notifier flagsCarlos Garnacho2020-06-181-4/+4
| | | | | | | | URNs are the preferred way to identify resources in a tracker store, don't treat them as an afterthought here and query the URNs right away. Drop the flags argument entirely as it becomes unneeded, any further information cannot be inferred and should be performed by the user.
* trackertestutils: Unbreak tracker-sandboxSam Thursfield2020-06-182-1/+3
| | | | I renamed some files without updating meson.build, in 12a23d2e88d6b44e.
* Merge branch 'sam/print-timeouts' into 'master'Sam Thursfield2020-06-171-4/+4
|\ | | | | | | | | Print timeout values in await timeout errors See merge request GNOME/tracker!267
| * Print timeout values in await timeout errorsSam Thursfield2020-06-131-4/+4
| | | | | | | | Helpful to debug https://gitlab.gnome.org/GNOME/tracker-miners/-/merge_requests/209
* | build: Move trackertestutils to regular libdirSam Thursfield2020-06-171-3/+1
|/ | | | | | | | | | This models what gobject-introspection does with its giscanner library, which is the model I think we should copy (it's a Python module but we consider it Tracker-specific rather than part of the regular Python module ecosystem). Previously we tried to put it into lib/ rather than lib64/ on 64-bit systems. This causes unneeded friction.
* trackertestutils: Add an optional D-Bus system bus to the sandboxSam Thursfield2020-06-134-27/+99
| | | | This allows us to work with umockdev to simulate hardware events.
* trackertestutils: Add helper function to dconf moduleSam Thursfield2020-06-131-0/+20
| | | | This saves a small amount of copy-paste code in tracker-miners.git.
* trackertestutils: Split helpers.py into sandbox and storehelperSam Thursfield2020-06-133-625/+672
| | | | These two modules aren't related, it's cleaner to split them.
* trackertestutils: Fix argument parsingSam Thursfield2020-05-271-1/+1
| | | | The shell script that wraps the Python module was not quoting arguments properly :/
* trackertestutils: Improvement to option parsingSam Thursfield2020-05-271-16/+13
| | | | | Use argparse mutually-exclusive option groups instead of checking these manually.
* trackertestutils: Don't write config with --use-session-dirsSam Thursfield2020-05-271-1/+7
| | | | | We overwrite the user's real DConf settings in this case, which is confusing for everyone.
* trackertestutils: Add a way to run multiple commands in one sandboxSam Thursfield2020-05-273-6/+35
| | | | | | The new `--dbus-session-bus` argument can be used to run a command inside an existing sandbox. This is useful when developing and debugging.
* trackertestutils: Set LD_LIBRARY_PATH correctly on 64bit systemsSam Thursfield2020-05-231-0/+1
|
* build: Clean up typelib pathJan Tojnar2020-05-142-2/+2
| | | | | | It is better to set up the paths in the top level, rather than cobbling them up at place of use. Joining paths using string concatenation also breaks alternative Meson implementations that support absolute libdir option.
* tracker-sandbox: Add `--use-session-dirs` optionSam Thursfield2020-05-111-12/+24
| | | | | This can be used for interacting with your "real" Tracker store (in ~/.cache) with an uninstalled build of Tracker.
* tracker-sandbox: Disable miner initial sleepSam Thursfield2020-05-031-0/+4
|
* tracker-sandbox: Use correct settings schema for Tracker 3Sam Thursfield2020-05-031-3/+3
|
* tracker-sandbox: Allow specifying directories to index on commandlineSam Thursfield2020-05-031-2/+23
| | | | | | | | In particular, a new --index-recursive-tmpdir flag is designed for use by app test suites. They can run the set with a temporary directory already set up for indexing, and when they create content in this TRACKER_INDEXED_TMPDIR directory it'll automatically be indexed by the miner-fs and can be used in their tests.
* tracker-sandbox: Configure index directories correctlySam Thursfield2020-05-031-1/+1
| | | | | | We were configuring index-recursive-directories and index-single-directories with the same value, which let to all directories being indexed non-recursively.
* tracker-sandbox: Rename --index flag to --storeSam Thursfield2020-05-021-21/+21
| | | | | In preparation for adding a new `--index` option that controls which locations to index.
* trackertestutils: Really fix tracker-sandbox startup when installed outside /usrSam Thursfield2020-05-021-1/+1
| | | | Commit f3913b15e801327c48b didn't set the path properly.
* trackertestutils: Separate await_update() into two functionsSam Thursfield2020-05-021-34/+128
| | | | | | There are now two kinds of updates, property updates, and whole information updates where a resource is deleted and a new one inserted. Let's treat them separately.
* trackertestutils: Make the graph parameter explicitSam Thursfield2020-05-021-32/+41
| | | | | | Database queries should always specify the graph(s) they want to query from. This is how we enforce data isolation and it's also faster than running a query against the union of all graphs.
* trackertestutils: Fix some issues with D-Bus name changesSam Thursfield2020-05-021-5/+16
| | | | | | The stop_miner_fs() function is now stop_daemon() and the caller supplies the busname. This makes it more flexible and avoids hardcoding the miner-fs busname.
* trackertestutils: Fix crash if miner-fs isn't runningSam Thursfield2020-05-021-3/+7
| | | | | Calling .stop_miner_fs() could trigger a crash if the miner wasn't running (perhaps if it had itself crashed).
* trackertestutils: Add debugging hintSam Thursfield2020-05-021-8/+20
| | | | | I didn't make this a proper feature, but it's a clue that you can turn on D-Bus monitoring inside the sandbox.
* trackertestutils: Fix tracker-sandbox startup when installed outside /usrSam Thursfield2020-05-022-0/+2
| | | | | If Tracker is installed into /opt/tracker3 for example then the introspection data will be missed. Let's make this just work.
* trackertestutils: Remove unneeded importsSam Thursfield2020-05-021-3/+0
|
* Remove unused ontologiesSam Thursfield2020-05-011-1/+0
| | | | | | | | | | | | | | All of these are unused within tracker-miners, and as far as we know they are also unused in GNOME. Each ontology has a cost on database size and on time to create a new database, so it's good to limit these as much as we can. Alternatives: - nid3: use nmm ontology - ncal, scal: use evolution-data-server as GNOME Calendar does - mlo: use slo ontology
* utils/ontology: DeleteSam Thursfield2020-05-0120-1380/+0
| | | | | I don't think any of this is being used by anyone. Let me know if that's not true! :)
* trackertestutils: Prepare for DataObject/InformationElement splitCarlos Garnacho2020-04-291-2/+2
| | | | | Check things through nie:isStoredAs, even though it currently points to self in most situations.
* trackertestutils: Make await_update handle for InformationElement rewritesCarlos Garnacho2020-04-291-6/+19
| | | | | | With DataObject and InformationElement being split, a file update may result in the InformationElement being torn out and completely recreated. Add code to handle this situation to await_update.
* Merge branch 'sam/debug' into 'master'Sam Thursfield2020-04-231-27/+2
|\ | | | | | | | | | | | | Rework debug logging for 3.0 Closes #178 See merge request GNOME/tracker!219
| * Remove TRACKER_VERBOSITY and tracker-log moduleSam Thursfield2020-04-201-27/+2
| | | | | | | | | | | | | | | | | | Users should now use G_MESSAGES_DEBUG=Tracker to see debug messages on the console. The TRACKER_VERBOSITY only worked if tracker_log_init() had been called, which can't be done when libtracker-sparql is being used from an application outside of Tracker.
* | Update ontology URLs for 3.0Sam Thursfield2020-04-228-69/+69
|/ | | | | | | | | | | | | | | Our ontology URLs now use a namespace that we manage, at http://tracker.api.gnome.org/. This domain won't expire and can redirect anywhere we want, so that it can always link to the correct documentation for the ontologies. We are going to continue using the Nepomuk name in the ontologies that were developed by the Nepomuk project, despite changing the URL. This way we acknowledge that we have downstream changes to the Nepomuk ontologies but still provide a link to the original shared vocabularies. Fixes https://gitlab.gnome.org/GNOME/tracker/-/issues/162 and https://gitlab.gnome.org/GNOME/tracker/-/issues/104
* utils: Update references to tracker miners' DBus namesCarlos Garnacho2020-04-055-7/+7
| | | | It's bumping to org.freedesktop.Tracker3.*
* Merge branch 'sam/test-utils' into 'master'Sam Thursfield2020-04-042-4/+17
|\ | | | | | | | | Functional test improvements See merge request GNOME/tracker!207
| * trackertestutils: Add some utils needed in tracker-miner testssam/test-utilsSam Thursfield2020-03-232-4/+17
| |
* | Merge branch 'sam/remove-maemo' into 'master'Sam Thursfield2020-03-313-213/+0
|\ \ | |/ |/| | | | | Remove maemo ontology and tracker:defaultValue setting See merge request GNOME/tracker!194
| * Remove Maemo ontologySam Thursfield2020-03-063-213/+0
| | | | | | | | It's very obsolete.
* | Merge branch 'sam/sandbox-improvements' into 'master'Sam Thursfield2020-03-151-71/+30
|\ \ | | | | | | | | | | | | Some improvements for tracker-sandbox / run-uninstalled script See merge request GNOME/tracker!197
| * | trackertestutils: Fix crash on SIGINTSam Thursfield2020-03-091-3/+11
| | | | | | | | | | | | | | | | | | This code never executed because the sandbox would probably have already crashed due to the D-Bus daemon exiting before we wanted it to.
| * | trackertestutils: Always start D-Bus daemon in a new sessionSam Thursfield2020-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This means that if the user presses CTRL+C, the sandbox process will handle it and will shut down processes cleanly, but the D-Bus daemon will not receive the CTRL+C and will keep running until the sandbox process tells it to stop. This prevents errors during shutdown of Tracker processes which don't expect the message bus to have already disappeared.
| * | trackertestutils: Don't index applications by defaultSam Thursfield2020-03-091-3/+8
| | | | | | | | | | | | | | | | | | This means that Tracker instances created for testing and development will begin empty, and will only contain content explicitly added by the developer.