|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 2/2] CI: collect certain intermediate files as artifacts
On Mon, 11 May 2026, Jan Beulich wrote: > When one of the linking passes fails, additional intermediate files are > still in place. Having them available for analysis of the underlying > problem can be pretty helpful. Collect some into a new intermediates/ > directory. (Nothing new will be collected if linking succeeds.) > > As the script is run with -e passed to bash, defer exit if the main > "make" (or substituent script thereof) failed. This way more artifacts > are collected, potentially making it easier to analyze the failure. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/2515787945 > (with PPC forced to invoke the new logic, hence respective failures there) > --- > v2: Different approach. > > --- a/automation/gitlab-ci/build.yaml > +++ b/automation/gitlab-ci/build.yaml > @@ -6,6 +6,7 @@ > artifacts: > paths: > - binaries/ > + - intermediates/ > - xen-config > - xen-cppcheck.txt > - '*.log' > --- a/automation/scripts/build > +++ b/automation/scripts/build > @@ -37,22 +37,24 @@ else > make -j$(nproc) -C xen olddefconfig > fi > > -# Save the config file before building because build failure causes the > script > -# to exit early -- bash is invoked with -e. > +# Save the config file before building, just in case. > cp xen/.config xen-config > > -# Directory for the artefacts to be dumped into > -mkdir -p binaries > +# Directories for artefacts to be dumped into > +mkdir -p binaries intermediates > + > +# Script exit status, to be overridden by the main make's status below. > +ret=0 > > if [[ "${CPPCHECK}" == "y" ]] && [[ "${HYPERVISOR_ONLY}" == "y" ]]; then > # Cppcheck analysis invokes Xen-only build > - xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- -j$(nproc) > + xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- > -j$(nproc) || ret=$? > > # Preserve artefacts > cp xen/cppcheck-report/xen-cppcheck.txt xen-cppcheck.txt > elif [[ "${HYPERVISOR_ONLY}" == "y" ]]; then > # Xen-only build > - make -j$(nproc) xen > + make -j$(nproc) xen || ret=$? > else > # Full build. Figure out our ./configure options > cfgargs=("--prefix=/usr") > @@ -90,7 +92,7 @@ else > fi > > ./configure "${cfgargs[@]}" > - make -j$(nproc) dist > + make -j$(nproc) dist || ret=$? > > # Preserve artefacts > (cd dist/install; find | cpio -R 0:0 -o -H newc | gzip) > > binaries/xen-tools.cpio.gz > @@ -106,3 +108,12 @@ for f in xen/xen xen/xen-syms xen/xen.ef > cp $f binaries/ > fi > done > + > +# Preserve Xen intermediate files. Some may be there only upon build > failure. > +for f in xen/.xen-syms.* xen/.xen.efi.*; do > + if [[ -f $f ]]; then > + cp $f intermediates/ > + fi > +done > + > +exit $ret >
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |