summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 29a459acdb3f0c06c4e9f7b65f64648029bcefb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
variables:
  # These can be used to see verbose log output from the functional-tests.
  # See HACKING.md for more information.
  TRACKER_VERBOSITY: "0"
  TRACKER_TESTS_VERBOSE: "no"

  # This can be used when debugging test failures that only occur within GitLab CI.
  MESON_TEST_EXTRA_ARGS: ""

stages:
  - test

test-fedora-latest:
  stage: test
  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest

  script:
    - su tracker -c 'mkdir build'
    - su tracker -c 'cd build; meson .. -Db_lto=true -Db_coverage=true'
    - su tracker -c 'cd build; ninja'
    - |
      # Remove the many "CI_" variables from the environment. Meson dumps the
      # whole environment for every failed test, and that gives a whole
      # screenful of junk each time unless we strip these.
      unset $(env|grep -o '^CI_[^=]*')

      su tracker -c 'cd build; meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}'

  after_script:
    - |
      echo "Test suite settings:"
      echo
      echo "  TRACKER_VERBOSITY: ${TRACKER_VERBOSITY}"
      echo "  TRACKER_TESTS_VERBOSE: ${TRACKER_TESTS_VERBOSE}"
      echo "  MESON_TEST_EXTRA_ARGS: ${MESON_TEST_EXTRA_ARGS}"
      echo
      echo "These values can be set at https://gitlab.gnome.org/GNOME/tracker/pipelines/new"

  artifacts:
    when: always
    paths:
    - build/meson-logs/testlog.txt