1. 15 Sep, 2019 5 commits
  2. 14 Sep, 2019 31 commits
    • Sam Thursfield's avatar
      Merge branch 'sam/ci-4-processes' into 'master' · 1d8cf637
      Sam Thursfield authored
      ci: Run a maximum of 4 tests simultaneously
      See merge request !136
    • Sam Thursfield's avatar
      ci: Run a maximum of 4 tests simultaneously · 7966322e
      Sam Thursfield authored
      This is an attempt to deal with the random test failures that sometimes
      appear, e.g. https://gitlab.gnome.org/GNOME/tracker/-/jobs/432429
      The CI runners on gitlab.gnome.org report 32 CPU cores, so Meson tries
      to run 32 tests at a time. I guess because our tests are mostly IO
      bound this actually makes things slower and causes random failures.
    • Sam Thursfield's avatar
      Merge branch 'sam/test-fixes' into 'master' · fd5c2933
      Sam Thursfield authored
      functional-tests: Two small fixes
      See merge request !135
    • Sam Thursfield's avatar
      ci: Note how many processes Meson is using · 802caa34
      Sam Thursfield authored
      The CI runners on gitlab.gnome.org seem to have huge numbers of CPUs
      but they don't have the IO capacity to match, leading to test timeouts.
    • Sam Thursfield's avatar
    • Sam Thursfield's avatar
      functional-tests/ipc: Set GSETTINGS_SCHEMA_DIR · 3d7563da
      Sam Thursfield authored
      Otherwise the tests fail in CI or when there are local changes to the
      settings schemas.
    • Sam Thursfield's avatar
      Merge branch 'sam/sandbox-rewrite-2' into 'master' · 8f9645c8
      Sam Thursfield authored
      Rework the tracker-sandbox utility (again)
      Closes #111
      See merge request !133
    • Sam Thursfield's avatar
      functional-tests: Report failures in tests/ipc/test-insert-or-replace · 92483a9d
      Sam Thursfield authored
      This test needs to set the correct exitcode.
    • Sam Thursfield's avatar
      functional-tests: Don't ignore failures in ipc/ tests · 1e66800f
      Sam Thursfield authored
      This fixes a regression introduced in 14e557aa.
      Tracker Sandbox now passes on the returncode from the subprocess
      so that failing tests are noticed by `meson test` as expected.
    • Sam Thursfield's avatar
    • Sam Thursfield's avatar
      Rework the tracker-sandbox utility (again) · b68cef02
      Sam Thursfield authored
      This fixes #111 and also
      simplifies the instructions in the README for running Tracker from
      the build tree.
      The sandbox utility is now executed from the top directory by running:
          python3 -m utils.trackertestutils
      Previously, due to importing stuff from trackertestutils. you needed to
      run it from the utils/ directory or set PYTHONPATH appropriately.
      Additionally, tracker-miners.git will ship a 'run-uninstalled' script
      to provide convenient access to the sandbox script and allow running
      Tracker from the build tree.
    • Sam Thursfield's avatar
      Merge branch 'sam/functional-tests-quiet' into 'master' · e072f03b
      Sam Thursfield authored
      Rewrite how functional tests are implemented
      Closes #123
      See merge request !130
    • Sam Thursfield's avatar
      trackertestutils: Use default timeout when calling tracker-store D-Bus methods · 60b0f7fb
      Sam Thursfield authored
      The default timeout of a GDBusProxy object is 25 seconds, but we were
      reducing that to 5 seconds. This resulted in occasional test failures
      (especially in functional-07-graph).
      (The test failures would occur on systems with many CPUs where the tests
      ran in parallel, which in practice meant they only failed in GitLab CI.
      I found that I could reproduce the failure locally by running `meson
      test --num-processes=100` though.)
    • Sam Thursfield's avatar
      functional-tests: Set test runner verbosity to 2 · eb72f5b7
      Sam Thursfield authored
      Tests would previously output progress dots and a summary, like this:
          .(tracker-store:5918): GLib-GObject-CRITICAL **: 10:53:10.135: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
          ..(tracker-store:5952): GLib-GObject-CRITICAL **: 10:53:10.857: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
          ..................(tracker-store:5986): GLib-GObject-CRITICAL **: 10:53:13.275: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
          ..(tracker-store:6042): GLib-GObject-CRITICAL **: 10:53:13.985: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
          Ran 23 tests in 4.555s
      This not very useful when we see error output during the test, as you
      can see in the example.
      The test log now contains the name of each test. Errors from Tracker
      daemons now appear like this:
          test_batch_insert_01 (__main__.TrackerStoreBatchUpdateTest) ... ok
          (tracker-store:6341): GLib-GObject-CRITICAL **: 10:56:18.859: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
          test_delete_01 (__main__.TrackerStoreDeleteTests) ... ok
          test_delete_02 (__main__.TrackerStoreDeleteTests) ... ok
          (tracker-store:6374): GLib-GObject-CRITICAL **: 10:56:19.581: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
          test_insert_01 (__main__.TrackerStoreInsertionTests) ... ok
          test_insert_02 (__main__.TrackerStoreInsertionTests) ... ok
    • Sam Thursfield's avatar
      functional-tests: Terminate Tracker processes before the message bus · 2473e123
      Sam Thursfield authored
      This reduces the volume of criticals like this that we see in the log
          (tracker-miner-fs:14955): GLib-GIO-CRITICAL **: 11:38:40.386: Error while sending AddMatch() message: The connection is closed
      I did still see one test that output a bunch of similar criticals from
    • Sam Thursfield's avatar
      ci: Allow controlling verbosity of tests in CI · b7e45448
      Sam Thursfield authored
      There is also a MESON_TEST_EXTRA_ARGS variable which can be set to cause
      only one test to execute. This is to help with debugging test failures
      that can only be reproduced on the CI runners.
    • Sam Thursfield's avatar
      Expose dbus_services_dir to dependent projects · e13d9087
      Sam Thursfield authored
      The tracker-miners tests now depend on the
      tests/services/org.freedesktop.Tracker1.service file. We need to expose
      it. The pkg-config variable is for situations where we build against an
      installed Tracker core (so we use the normal service file, and honour
      any custom location that the user specified for it). The Meson variable
      is for when Tracker core is built as a subproject of tracker-miners.
    • Sam Thursfield's avatar
      Use g_message() instead of g_print() in daemons · 12f095cc
      Sam Thursfield authored
      All logs should go through the GLib logging system so they can be
      properly enabled and disabled with the TRACKER_VERBOSITY variable.
    • Sam Thursfield's avatar
      Enable G_MESSAGES_DEBUG=Tracker rather than G_MESSAGES_DEBUG=all · 240268b9
      Sam Thursfield authored
      In order for our g_info()/g_message()/g_debug() log messages to be
      handled, we need to have G_MESSAGES_DEBUG=Tracker enabled in the
      environment. Previously we would enable G_MESSAGES_DEBUG=all, which
      has the effect of also enabling log output from GLib/GIO and other
      In the interests of keeping logs clean, we now require the user to
      explicitly set G_MESSAGES_DEBUG=all if they want maximum debug output.
    • Sam Thursfield's avatar
      Disable D-Bus service startup timeout · d5c4f720
      Sam Thursfield authored
      This timeout interferes with debugging. If you attach GDB to a daemon
      as it starts up and step through the code, the timeout can cause
      dbus-daemon to kill the process that you're debugging.
      We can rely on `meson test` to kill tests that actually don't finish,
      and the `meson test` timeout can be conveniently increased with the
      `--timeout-multiplier` commandline option.
    • Sam Thursfield's avatar
      Add HACKING.md · b1b130ac
      Sam Thursfield authored
      This talks about how to enable different kinds of logging output from
      the functional tests, now that the previous commit has introduced some
      sanity into the logging.
      Attaching debugger is also discussed.
    • Sam Thursfield's avatar
      Remove test-runner.sh.in · d286930d
      Sam Thursfield authored
    • Sam Thursfield's avatar
      functional-tests: Run the IPC tests through tracker-sandbox · 14e557aa
      Sam Thursfield authored
      We can't use trackertestutils directly in these tests, because they are
      not written in Python. Now we use tracker-sandbox and a few environment
      variables set in meson.build to achieve the same thing.
    • Sam Thursfield's avatar
      utils/sandbox: Add --index-tmpdir option · 7b64753d
      Sam Thursfield authored
      This makes the tracker-sandbox utility more useful as a test harness.
    • Sam Thursfield's avatar
      utils/sandbox: Add --dbus-config option · 072ad286
      Sam Thursfield authored
      This allows tracker-sandbox to be used as a test runner for when the
      daemons are not yet installed.
    • Sam Thursfield's avatar
      functional-tests: Remove +x bit from functional-tests · 5c60dc44
      Sam Thursfield authored
      We expect them to be run from `meson test` now.
      If you do want to run them manually, run the test with `meson test
      --verbose` and it will show you the commandline it uses, which you can
      then use to run the test from your shell.
    • Sam Thursfield's avatar
      functional-tests: Start daemons through D-Bus autolaunch · dae63fea
      Sam Thursfield authored
      Instead of manually running and managing Tracker daemon processes
      manually in the test, we now rely on our private D-Bus daemon to
      do so.
      This makes the test environment more like a real Tracker deployment.
      Log output from the D-Bus daemon is now captured and output through
      the Python logging system. This allows for finer-grained filtering
      of output from the tests themselves and from the Tracker daemons.
      Some test code is changed to support the new model.
    • Sam Thursfield's avatar
    • Sam Thursfield's avatar
      functional-tests/ipc: Fix invalid INSERT in testcase · fb65a8b9
      Sam Thursfield authored
      The test passed, but it was actually hitting a g_critical(). Improved
      logging meant that the error became visible in the logs!
    • Sam Thursfield's avatar
      Merge branch 'sam/unref-fix' into 'master' · 62a0ebbd
      Sam Thursfield authored
      libtracker-direct: Add missing 'unowned' annotation
      See merge request !134
    • Sam Thursfield's avatar
      libtracker-direct: Add missing 'unowned' annotation · c297cd76
      Sam Thursfield authored
      The .get_data_manager() method doesn't ref the data manager before
      returning it. Vala code that called this method wasn't reffing it
      either because 'owned' is the default ownership flag.
      This fixes a critical that sometimes appeared on shutdown of
              (tracker-store:5986): GLib-GObject-CRITICAL **: 10:53:13.275: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
  3. 12 Sep, 2019 1 commit
  4. 10 Sep, 2019 3 commits