[libcamera-ci] [PATCH] Enable junit artifact generation for test-unit job
Kieran Bingham
kieran.bingham at ideasonboard.com
Mon Dec 16 13:21:11 CET 2024
Quoting Laurent Pinchart (2024-12-16 10:03:45)
> On Mon, Dec 16, 2024 at 08:40:14AM +0100, Jacopo Mondi wrote:
> > 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
> > > ---
That indeed looks nice for integrating into the pipeline.
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
I look forward to seeing more tests either virtual or real hardware
included :D
> > > .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 ?
>
> Yes, it's nice :-)
>
> > The output is indeed nice from the web interface
> > Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
>
> --
> Regards,
>
> Laurent Pinchart
More information about the libcamera-devel
mailing list