git: a5f03413aade - main - ci: Redirect output for builds.

From: Warner Losh <imp_at_FreeBSD.org>
Date: Thu, 23 May 2024 18:00:02 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=a5f03413aade8f69cf954162151da043d34dd1f5

commit a5f03413aade8f69cf954162151da043d34dd1f5
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-05-23 17:37:01 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-23 17:59:40 +0000

    ci: Redirect output for builds.
    
    This target is far too noisy to be at all useful. Save the output ala
    make universe in _. files. Also report where to find errors.
    
    Sponsored by:           Netflix
---
 tests/ci/Makefile | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/tests/ci/Makefile b/tests/ci/Makefile
index 8892b0860260..fed66e5cc317 100644
--- a/tests/ci/Makefile
+++ b/tests/ci/Makefile
@@ -147,19 +147,31 @@ beforeclean: .PHONY
 clean: beforeclean .PHONY
 
 ci-buildworld: .PHONY
-	${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildworld
+	@echo "Building world for ${TARGET_ARCH}"
+	${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \
+		${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} \
+		buildworld > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \
+		(echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false)
+
 
 ci-buildkernel: ci-buildworld-${TARGET_ARCH:tl} .PHONY
-	${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} ${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} SRCCONF=${SRCCONF} buildkernel
+	@echo "Building kenrel for ${TARGET_ARCH"}"
+	${IMAKE} -j${PARALLEL_JOBS} -C ${WORLDDIR} ${METAMODE} \
+		${CROSS_TOOLCHAIN_PARAM} __MAKE_CONF=${MAKECONF} \
+		SRCCONF=${SRCCONF} buildkernel > ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \
+		(echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false)
 
 ci-buildimage: ${QEMUTGT} ci-buildkernel-${TARGET_ARCH:tl} .PHONY
+	@echo "Building ci image for ${TARGET_ARCH"}"
 	mkdir -p ${.OBJDIR}/${.TARGET}
 	env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \
 		QEMUSTATIC=${QEMUSTATIC} CITYPE=${CITYPE} \
 		${RELEASEDIR}/scripts/mk-vmimage.sh \
 		-C ${RELEASEDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} -F ${VMFS} \
 		-i ${.OBJDIR}/ci.img -s ${VMSIZE} -f ${FORMAT} \
-		-S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF}
+		-S ${WORLDDIR} -o ${.OBJDIR}/${CIIMAGE} -c ${CICONF} \
+		> ${.CURDIR}/_.${TARGET_ARCH}.${.TARGET} 2>&1 || \
+		(echo "${.TARGET} failed, check _.${TARGET_ARCH}.${.TARGET} for details" ; false)
 	touch ${.TARGET}
 
 ci-setsmokevar: .PHONY