[tracker/sam/functional-tests-quiet: 1/4] ci: Allow controlling verbosity of tests in CI
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-tests-quiet: 1/4] ci: Allow controlling verbosity of tests in CI
- Date: Sat, 14 Sep 2019 10:33:56 +0000 (UTC)
commit f4c7ed5b7dabf04a59214317e4dd844c29abc6e6
Author: Sam Thursfield <sam afuera me uk>
Date: Tue Sep 10 11:13:36 2019 +0200
ci: Allow controlling verbosity of tests in CI
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.
.gitlab-ci.yml | 22 +++++++++++++++++++++-
HACKING.md | 5 +++++
2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1922acfb5..36e5fac32 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,3 +1,12 @@
+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
@@ -5,6 +14,17 @@ test-fedora-latest:
stage: test
image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+ before_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"
+ echo
+
script:
- su tracker -c 'mkdir build'
- su tracker -c 'cd build; meson .. -Db_lto=true -Db_coverage=true'
@@ -15,7 +35,7 @@ test-fedora-latest:
# screenful of junk each time unless we strip these.
unset $(env|grep -o '^CI_[^=]*')
- su tracker -c 'cd build; meson test --print-errorlogs'
+ su tracker -c 'cd build; meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}'
artifacts:
when: always
diff --git a/HACKING.md b/HACKING.md
index 389b9c2a1..b907f3112 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -25,6 +25,11 @@ Tracker processes. Anything written directly to stdout, for example by
`g_print()` or by the dbus-daemon itself, will not be displayed unless
`TRACKER_TESTS_VERBOSE` is set.
+When working with GitLab CI, you can use the
+[Run Pipeline dialog](https://gitlab.gnome.org/GNOME/tracker/pipelines/new)
+to set the values of these variables and increase the verbosity of the tests in
+CI.
+
# Attaching a debugger to Tracker daemons
Tracker daemons are not started directly. Instead they are started by the D-Bus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]