summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-04-15 11:27:30 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-04-23 13:38:47 +1000
commit54ca9223e605824229deab67437d82be6bb478ab (patch)
tree2412031372de16a8e8d028e485000b5885d6898b /.gitlab-ci.yml
parentae2ff14aa0d2f440a2cfe7a39daf12a009f8f914 (diff)
downloadxkeyboard-config-54ca9223e605824229deab67437d82be6bb478ab.tar.gz
gitlab CI: parse through the YAML file to list failed keymap compilations
libxkbcommon (commit 1cae25005211) now provides the output of the layout tester format in YAML, with successful compilations on stdout and failed ones on stderr. This makes it easy to collect the results, extract and print the failures with yq but also parse the yaml file and leave a JUnit XML in place that will then show up as result on a MR page. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml23
1 files changed, 14 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1edc3e9..3dc25db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@ variables:
# Changing the tag will rebuild the container images. The value is just a
# string, but we use the date for human benefits.
- FDO_DISTRIBUTION_TAG: '2021-01-08.0'
+ FDO_DISTRIBUTION_TAG: '2021-04-16.0'
stages:
@@ -43,7 +43,7 @@ container-prep:
# minimal set of packages required to build xkeyboard-config.
BASE_PACKAGES: 'xorg-util-macros autoconf automake make gettext pkg-config gcc grep m4 python meson ninja git'
# extra packages we need for various tests
- EXTRA_PACKAGES: 'tree libxml2 bison xorg-xkbcomp python-pytest python-libevdev'
+ EXTRA_PACKAGES: 'tree libxml2 bison xorg-xkbcomp python-pytest python-libevdev python-yaml yq'
FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $EXTRA_PACKAGES
@@ -229,21 +229,26 @@ layout_tests:
- meson builddir -Denable-wayland=false -Denable-x11=false -Denable-docs=false -Dxkb-config-root="$INSTDIR/share/X11/xkb"
- ninja -C builddir
- echo Running test script - this will take several minutes
- - ./builddir/xkeyboard-config-test "$INSTDIR/share/X11/xkb/rules/evdev.xml" > $INSTDIR/xkeyboard-config-test.stdout 2> $INSTDIR/xkeyboard-config-test.stderr
- - ./builddir/xkeyboard-config-test "$INSTDIR/share/X11/xkb/rules/evdev.extras.xml" >> $INSTDIR/xkeyboard-config-test.stdout 2>> $INSTDIR/xkeyboard-config-test.stderr
+ - ./builddir/xkeyboard-config-test --verbose "$INSTDIR/share/X11/xkb/rules/evdev.xml" > $INSTDIR/keymaps-success.yaml 2> $INSTDIR/keymaps-failed.yaml
+ - ./builddir/xkeyboard-config-test --verbose "$INSTDIR/share/X11/xkb/rules/evdev.extras.xml" >> $INSTDIR/keymaps-success.yaml 2>> $INSTDIR/keymaps-failed.yaml
- popd > /dev/null
after_script:
- - xz -z "$INSTDIR/xkeyboard-config-test.stdout"
- - xz -z "$INSTDIR/xkeyboard-config-test.stderr"
+ - echo "Failed keymap compilations:"
+ - yq -c ".[] | select(.status != 0) | .cmd, .error" $INSTDIR/keymaps-failed.yaml
+ - .gitlab-ci/yaml-to-junit-xml.py $INSTDIR/keymaps-failed.yaml > junit-results.xml
+ - xz -z "$INSTDIR/keymaps-success.yaml"
+ - xz -z "$INSTDIR/keymaps-failed.yaml"
variables:
- GIT_STRATEGY: none
+ GIT_DEPTH: 1
artifacts:
when: on_failure
name: xkeyboard-config test output
expire_in: 2 weeks
paths:
- - $INSTDIR/xkeyboard-config-test.stdout.xz
- - $INSTDIR/xkeyboard-config-test.stderr.xz
+ - $INSTDIR/keymaps-success.yaml.xz
+ - $INSTDIR/keymaps-failed.yaml.xz
+ reports:
+ junit: junit-results.xml
keymap_tests:
extends: .default_setup