This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Tracker Functional Testing

Tracker has a set of functional tests to verify it is working fine in some basic (and not so basic) use cases. While the unit tests exercise specific areas of the code, the functional-tests simulate real Tracker use cases.

The functional tests are enabled by default in the Meson build system and in Tracker's GitLab CI pipelines.

1.1. Debugging Tips

1.1.1. Verbose output

By default the functional tests produce no output.

You can get debug output by setting TRACKER_TESTS_VERBOSE=1 in the environment. Once this is set, you can also use set TRACKER_VERBOSITY=3 to get verbose output from the Tracker daemons.

1.1.2. Debugging the Tracker daemons

The functional-tests execute the Tracker daemons themselves. This makes it tricky if you want to attach a debugger to one of the daemons in order to investigate some problem.

The recommended way to do this is add a Python debugger breakpoint early on in the test in question. This is done by inserting two lines in the test code:

    import pdb
    pdb.set_trace()

Now when you run the test, it'll pause and wait for input. You can then open a second terminal and attach a debugger such as GDB to the tracker process you want to debug.


2024-10-23 10:59