Skip to contentSkip to conversation

CI: Capture test logs as GitLab artifacts

PATCH In review Daniel Stone 5 participants 5 messages Sep 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CI: Capture test logs as GitLab artifacts

GitLab CI already captures all the stdout/stderr output from the build process as the log. However, some other important information is hidden in other log files.

Taken from Wayland, capture logs from the configuration process as well as from every check.

Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Eric Engeström <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
.gitlab-ci.yml +26 -0
index eee6abfc..50ec8527 100644
@@ -1,6 +1,29 @@
+.artifacts-meson: &artifacts-meson
+  when: always
+  paths:
+   - _build/meson-logs
+
+.artifacts-autotools: &artifacts-autotools
+  when: always
+  paths:
+    - _build/*.log
+    - _build/amdgpu/*.log
+    - _build/etnaviv/*.log
+    - _build/exynos/*.log
+    - _build/freedreno/*.log
+    - _build/intel/*.log
+    - _build/libkms/*.log
+    - _build/nouveau/*.log
+    - _build/omap/*.log
+    - _build/radeon/*.log
+    - _build/tegra/*.log
+    - _build/tests/*.log
+    - _build/tests/*/*.log
+
 latest-meson:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-meson
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -35,6 +58,7 @@ latest-meson:
 latest-autotools:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-autotools
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -69,6 +93,7 @@ latest-autotools:
 oldest-meson:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-meson
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
@@ -125,6 +150,7 @@ oldest-meson:
 oldest-autotools:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-autotools
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
Signature · 6 lines
2.19.0.rc0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Daniel Stone

GitLab CI already captures all the stdout/stderr output from the build process as the log. However, some other important information is hidden in other log files.

Quoted 8 lines

Taken from Wayland, capture logs from the configuration process as well as from every check.

Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Eric Engeström <[email protected]>
Cc Daniel Vetter <[email protected]>

I think there's also an option to capture all non-tracked files when the build fails. For the lazy :-) But this looks good too.

Quoted 65 lines
---
 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
.gitlab-ci.yml +26 -0
index eee6abfc..50ec8527 100644
@@ -1,6 +1,29 @@
+.artifacts-meson: &artifacts-meson
+  when: always
+  paths:
+   - _build/meson-logs
+
+.artifacts-autotools: &artifacts-autotools
+  when: always
+  paths:
+    - _build/*.log
+    - _build/amdgpu/*.log
+    - _build/etnaviv/*.log
+    - _build/exynos/*.log
+    - _build/freedreno/*.log
+    - _build/intel/*.log
+    - _build/libkms/*.log
+    - _build/nouveau/*.log
+    - _build/omap/*.log
+    - _build/radeon/*.log
+    - _build/tegra/*.log
+    - _build/tests/*.log
+    - _build/tests/*/*.log
+
 latest-meson:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-meson
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -35,6 +58,7 @@ latest-meson:
 latest-autotools:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-autotools
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -69,6 +93,7 @@ latest-autotools:
 oldest-meson:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-meson
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
@@ -125,6 +150,7 @@ oldest-meson:
 oldest-autotools:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-autotools
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
Signature · 1 line
2.19.0.rc0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Daniel Stone

GitLab CI already captures all the stdout/stderr output from the build process as the log. However, some other important information is hidden in other log files.

Taken from Wayland, capture logs from the configuration process as well as from every check.

Quoted 8 lines
Quoted 5 lines
Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Eric Engeström <[email protected]>
Cc Daniel Vetter <[email protected]>

I think there's also an option to capture all non-tracked files when the build fails. For the lazy :-) But this looks good too.

One person's lazy is another person's efficient [1] :-)

Sean

[1]- https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/commit/68a78ef6bd8b8ddf710e9a0654fa47cdc1f158d3#587d266bb27a4dc3022bbed44dfa19849df3044c_17_15

Quoted 76 lines
Quoted 65 lines
---
 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
.gitlab-ci.yml +26 -0
index eee6abfc..50ec8527 100644
@@ -1,6 +1,29 @@
+.artifacts-meson: &artifacts-meson
+  when: always
+  paths:
+   - _build/meson-logs
+
+.artifacts-autotools: &artifacts-autotools
+  when: always
+  paths:
+    - _build/*.log
+    - _build/amdgpu/*.log
+    - _build/etnaviv/*.log
+    - _build/exynos/*.log
+    - _build/freedreno/*.log
+    - _build/intel/*.log
+    - _build/libkms/*.log
+    - _build/nouveau/*.log
+    - _build/omap/*.log
+    - _build/radeon/*.log
+    - _build/tegra/*.log
+    - _build/tests/*.log
+    - _build/tests/*/*.log
+
 latest-meson:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-meson
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -35,6 +58,7 @@ latest-meson:
 latest-autotools:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-autotools
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -69,6 +93,7 @@ latest-autotools:
 oldest-meson:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-meson
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
@@ -125,6 +150,7 @@ oldest-meson:
 oldest-autotools:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-autotools
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
Signature · 1 line
2.19.0.rc0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 1/1
#3 lore raw
In reply to Daniel Stone
Quoted 21 lines · Daniel Stone

GitLab CI already captures all the stdout/stderr output from the build process as the log. However, some other important information is hidden in other log files.

Taken from Wayland, capture logs from the configuration process as well as from every check.

Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Eric Engeström <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
.gitlab-ci.yml +0 -0
index eee6abfc..50ec8527 100644

.gitlab-ci.yml line 1

Quoted 1 line
.gitlab-ci.yml +1 -0
@@ -1,6 +1,29 @@
+.artifacts-meson: &artifacts-meson

Ooooh, variables? I might try to dedup the 'meson build' and 'autotools build' code with those :)

Quoted 8 lines
.gitlab-ci.yml +8 -0
+  when: always
+  paths:
+   - _build/meson-logs
+
+.artifacts-autotools: &artifacts-autotools
+  when: always
+  paths:
+    - _build/*.log

.gitlab-ci.yml line 19

Quoted 10 lines
.gitlab-ci.yml +10 -0
+    - _build/amdgpu/*.log
+    - _build/etnaviv/*.log
+    - _build/exynos/*.log
+    - _build/freedreno/*.log
+    - _build/intel/*.log
+    - _build/libkms/*.log
+    - _build/nouveau/*.log
+    - _build/omap/*.log
+    - _build/radeon/*.log
+    - _build/tegra/*.log

All of the above can be simplified to:
- _build/*/*.log

(vc4 is missing btw)

With vc4 added, or /*/ used:

Quoted 37 lines
.gitlab-ci.yml +7 -0
+    - _build/tests/*.log
+    - _build/tests/*/*.log
+
 latest-meson:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-meson
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -35,6 +58,7 @@ latest-meson:
 latest-autotools:
   stage: build
   image: base/archlinux:latest
+  artifacts: *artifacts-autotools
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
@@ -69,6 +93,7 @@ latest-autotools:
 oldest-meson:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-meson
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
@@ -125,6 +150,7 @@ oldest-meson:
 oldest-autotools:
   stage: build
   image: debian:stable
+  artifacts: *artifacts-autotools
   before_script:
     - printf > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft "%s\n"
         'path-exclude=/usr/share/doc/*'
Signature · 1 line
2.19.0.rc0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#4 lore raw
Quoted 46 lines · Eric Engestrom
Quoted 21 lines · Daniel Stone

GitLab CI already captures all the stdout/stderr output from the build process as the log. However, some other important information is hidden in other log files.

Taken from Wayland, capture logs from the configuration process as well as from every check.

Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Eric Engeström <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
.gitlab-ci.yml +0 -0
index eee6abfc..50ec8527 100644

.gitlab-ci.yml line 1

Quoted 1 line
.gitlab-ci.yml +1 -0
@@ -1,6 +1,29 @@
+.artifacts-meson: &artifacts-meson

Ooooh, variables? I might try to dedup the 'meson build' and 'autotools build' code with those :)

Quoted 8 lines
.gitlab-ci.yml +8 -0
+  when: always
+  paths:
+   - _build/meson-logs
+
+.artifacts-autotools: &artifacts-autotools
+  when: always
+  paths:
+    - _build/*.log

.gitlab-ci.yml line 19

Quoted 10 lines
.gitlab-ci.yml +10 -0
+    - _build/amdgpu/*.log
+    - _build/etnaviv/*.log
+    - _build/exynos/*.log
+    - _build/freedreno/*.log
+    - _build/intel/*.log
+    - _build/libkms/*.log
+    - _build/nouveau/*.log
+    - _build/omap/*.log
+    - _build/radeon/*.log
+    - _build/tegra/*.log
Quoted 8 lines

All of the above can be simplified to:
- _build/*/*.log

(vc4 is missing btw)

With vc4 added, or /*/ used:

I would fold everything in these tree lines.
- _build/*.log
- _build/*/*.log
- _build/*/*/*.log

It covers everything existing, plus catches future ones ;-) With that

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel