CI: Print error logs on test failure

It'll help to check what precisely failed with the test, instead of
getting only passed/failed states.
This commit is contained in:
Milan Crha 2023-09-18 13:42:11 +02:00 committed by Dhanuka Warusadura
parent 97d5c139ee
commit 64cf3ff4b3

View File

@ -15,7 +15,7 @@ fedora:Werror:
- meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations -Dgtk_doc=false - meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations -Dgtk_doc=false
- meson compile -C _build - meson compile -C _build
- eval `dbus-launch --sh-syntax` - eval `dbus-launch --sh-syntax`
- meson test -C _build - meson test -C _build --print-errorlogs
artifacts: artifacts:
when: on_failure when: on_failure
paths: paths:
@ -29,7 +29,7 @@ fedora:asan:
- meson _build -Db_sanitize=address -Dgtk_doc=false -Dintrospection=false - meson _build -Db_sanitize=address -Dgtk_doc=false -Dintrospection=false
- meson compile -C _build - meson compile -C _build
- eval `dbus-launch --sh-syntax` - eval `dbus-launch --sh-syntax`
- meson test -C _build - meson test -C _build --print-errorlogs
allow_failure: true allow_failure: true
artifacts: artifacts:
when: on_failure when: on_failure
@ -44,7 +44,7 @@ fedora:ubsan:
- meson _build -Db_sanitize=undefined -Dgtk_doc=false - meson _build -Db_sanitize=undefined -Dgtk_doc=false
- meson compile -C _build - meson compile -C _build
- eval `dbus-launch --sh-syntax` - eval `dbus-launch --sh-syntax`
- meson test -C _build - meson test -C _build --print-errorlogs
artifacts: artifacts:
when: on_failure when: on_failure
paths: paths:
@ -78,7 +78,7 @@ fedora:coverage:
- swtpm socket --tpm2 --tpmstate dir=$XDG_CONFIG_HOME/mytpm1 --flags startup-clear --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --daemon - swtpm socket --tpm2 --tpmstate dir=$XDG_CONFIG_HOME/mytpm1 --flags startup-clear --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --daemon
- 'tpm2-abrmd --logger=stdout --tcti=swtpm: --session --allow-root --flush-all &' - 'tpm2-abrmd --logger=stdout --tcti=swtpm: --session --allow-root --flush-all &'
- 'export TCTI=tabrmd:bus_type=session' - 'export TCTI=tabrmd:bus_type=session'
- meson test -C _build - meson test -C _build --print-errorlogs
- ninja coverage-html -C _build - ninja coverage-html -C _build
coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/' coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'
artifacts: artifacts: