[libcamera-ci] [PATCH] Enable junit artifact generation for test-unit job
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Mon Dec 16 08:40:14 CET 2024
On Sun, Dec 15, 2024 at 11:22:55PM +0200, Laurent Pinchart wrote:
> Bump the minimum meson version to 1.2.0 to generate a proper junit
> report, and package it in artifacts in the test-unit job.
>
> Add the --break-system-packages to `pip3 install` for Debian bookworm
> and newer, as pip3 otherwise fails.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> Junit report output for unit tests:
> https://gitlab.freedesktop.org/pinchartl/libcamera/-/pipelines/1330345/test_report?job_name=test-unit
> ---
> .gitlab-ci/setup-container.sh | 11 ++++++++---
> gitlab-ci.yml | 16 ++++++----------
> 2 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh
> index d2909c7257d35b0d..6146bee4d55ea348 100755
> --- a/.gitlab-ci/setup-container.sh
> +++ b/.gitlab-ci/setup-container.sh
> @@ -187,17 +187,22 @@ cbuild_fixups() {
> echo "Applying miscellaneous fixups"
>
> local min_version
> + local pip3_options
> local version
>
> + if [[ $FDO_DISTRIBUTION_VERSION != 'bullseye' ]] ; then
> + pip3_options=--break-system-packages
> + fi
> +
> # Install meson from pip.
> - min_version=1.0.1
> + min_version=1.2.0
> version=$(dpkg_version meson)
> if dpkg_check_version $version $min_version ; then
> echo "meson $version too old, installing $min_version from pip"
>
> apt remove -y meson
> apt install -y python3-pip
> - pip3 install meson==${min_version}
> + pip3 install ${pip3_options} meson==${min_version}
> fi
>
> # Install pygments from pip.
> @@ -207,7 +212,7 @@ cbuild_fixups() {
> echo "pygments $version too old, installing $min_version from pip"
>
> apt install -y python3-pip
> - pip3 install pygments==${min_version}
> + pip3 install ${pip3_options} pygments==${min_version}
> fi
>
> # Create pybind11.pc manually if not provided by the distribution
> diff --git a/gitlab-ci.yml b/gitlab-ci.yml
> index 06ab27dc0af0d9df..2b37b7ed59d4fbd0 100644
> --- a/gitlab-ci.yml
> +++ b/gitlab-ci.yml
> @@ -59,17 +59,17 @@ include:
> .libcamera-ci.debian:11:
> variables:
> FDO_DISTRIBUTION_VERSION: 'bullseye'
> - FDO_DISTRIBUTION_TAG: '2024-11-05.1'
> + FDO_DISTRIBUTION_TAG: '2024-12-15.1'
>
> .libcamera-ci.debian:12:
> variables:
> FDO_DISTRIBUTION_VERSION: 'bookworm'
> - FDO_DISTRIBUTION_TAG: '2024-11-05.1'
> + FDO_DISTRIBUTION_TAG: '2024-12-15.1'
>
> .libcamera-ci.debian:13:
> variables:
> FDO_DISTRIBUTION_VERSION: 'trixie'
> - FDO_DISTRIBUTION_TAG: '2024-11-05.1'
> + FDO_DISTRIBUTION_TAG: '2024-12-15.1'
>
> .container-debian:
> extends:
> @@ -406,10 +406,6 @@ test-unit:
> -D qcam=disabled
> -D test=true
> -D v4l2=true
> -
> - # meson prior to 1.2.0 doesn't correctly escape non-printable characters
> - # when generating the testlog XML. This results in an unparseable file.
> - # Skip it for now.
> - # artifacts:
> - # reports:
> - # junit: build/meson-logs/testlog.junit.xml
> + artifacts:
> + reports:
> + junit: build/meson-logs/testlog.junit.xml
So these are generated by default by meson ?
The output is indeed nice from the web interface
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
Thanks
j
> --
> Regards,
>
> Laurent Pinchart
>
More information about the libcamera-devel
mailing list