[tracker/sam/ci-save-logs-on-failure] ci: Upload test suite logs when tests fail
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/ci-save-logs-on-failure] ci: Upload test suite logs when tests fail
- Date: Mon, 4 Mar 2019 08:48:16 +0000 (UTC)
commit 27a2614f8a9d8cab59d1be466eb9cc67978281fb
Author: Sam Thursfield <sam afuera me uk>
Date: Mon Mar 4 09:43:29 2019 +0100
ci: Upload test suite logs when tests fail
We sometimes see unreproducible test failures in CI. These are often
hard to debug because they don't occur all the time, and may even be
triggered by something that only happens on a specific CI runner.
As a step towards debugging these, we should upload the test log as
a GitLab artifact whenever we see a CI failure. Meson only shows the
last 100 lines of the test log on stdout, and there seems to be no
way to cause it to emit more info, so this should help with debugging
https://gitlab.gnome.org/GNOME/tracker/issues/79.
.gitlab-ci.yml | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 702895724..67af88366 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,3 +16,8 @@ test-fedora-latest:
unset $(env|grep -o '^CI_[^=]*')
su tracker -c 'cd build; dbus-run-session -- env LANG=en_US.UTF8 meson test --print-errorlogs'
+
+ artifacts:
+ when: on_failure
+ paths:
+ - build/meson-logs/testlog.txt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]