aboutsummaryrefslogtreecommitdiffstats
path: root/meta-app-framework
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-09-21 13:30:20 -0400
committerScott Murray <scott.murray@konsulko.com>2020-09-24 22:51:33 +0000
commite4840596ab90e3b1c6e611110c21a179496eed7c (patch)
tree252104b1b73654ace3b422a31d4ec4eea48832ef /meta-app-framework
parent29a8a9d5d1e4d3641ef9cb3bb4d29575d29f6317 (diff)
meta-app-framework: Make autobuild failures fatal in aglwgt.bbclass
Now that all upstream widgets have updated autobuild scripts, aglwgt.bbclass can stop ignoring autobuild failures, any failure will now again be caught in do_compile and not at packaging time. Bug-AGL: SPEC-3593 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Idd70a7decf422fa9390d675ad9a4f2729023f322 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25338 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Diffstat (limited to 'meta-app-framework')
-rw-r--r--meta-app-framework/classes/aglwgt.bbclass35
1 files changed, 13 insertions, 22 deletions
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass
index 042c0fa94..bdd38f6f1 100644
--- a/meta-app-framework/classes/aglwgt.bbclass
+++ b/meta-app-framework/classes/aglwgt.bbclass
@@ -41,10 +41,6 @@ AGLWGT_CMAKE_CONFIGURE_ARGS ?= "-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmak
# building/packaging of the test widget for other widgets.
AGLWGT_HAVE_TESTS ?= "0"
-# Warning on missing test/debug/coverage packages disabled by default
-# for now to reduce build output clutter.
-AGLWGT_PACKAGE_WARN ?= "0"
-
# Whether the widget should be auto-installed on first boot
AGLWGT_AUTOINSTALL ?= "1"
@@ -93,22 +89,17 @@ aglwgt_do_compile() {
cd ${B}
fi
- if ! $bldcmd package BUILD_DIR=${B}/build-release ${AGLWGT_EXTRA_BUILD_ARGS}; then
- bbwarn "Target: package failed"
- fi
-
- if ! $bldcmd package-debug BUILD_DIR_DEBUG=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS}; then
- bbwarn "Target: package-debug failed"
- fi
+ $bldcmd package BUILD_DIR=${B}/build-release ${AGLWGT_EXTRA_BUILD_ARGS}
+ $bldcmd package-debug BUILD_DIR_DEBUG=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS}
if echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then
- if ! $bldcmd package-test BUILD_DIR_TEST=${B}/build-test ${AGLWGT_EXTRA_BUILD_ARGS}; then
- bbwarn "Target: package-test failed"
+ # Only try building the test widget if there's source for it, to avoid spurious errors
+ if [ -f ${S}/test/CMakeLists.txt ]; then
+ $bldcmd package-test BUILD_DIR_TEST=${B}/build-test ${AGLWGT_EXTRA_BUILD_ARGS}
fi
- if ! $bldcmd package-coverage BUILD_DIR_COVERAGE=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS}; then
- bbwarn "Target: package-coverage failed"
- fi
+ # The coverage widget should always build
+ $bldcmd package-coverage BUILD_DIR_COVERAGE=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS}
fi
}
@@ -130,15 +121,15 @@ aglwgt_do_install() {
bbfatal "no package found in widget directory"
fi
- for t in test debug coverage; do
+ for t in debug coverage test; do
if [ "$(find ${B}/build-${t} -name *-${t}.wgt -maxdepth 1)" ]; then
install -d ${D}/usr/AGL/apps/${t}
install -m 0644 ${B}/build-${t}/*-${t}.wgt ${D}/usr/AGL/apps/${t}/
- elif [ "${AGLWGT_PACKAGE_WARN}" = "1" ]; then
- if [ "$t" != "test" -a "$t" != "coverage" ]; then
- bbwarn "no package found in ${t} widget directory"
- elif echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then
- bbwarn "no package found in ${t} widget directory"
+ elif [ "$t" = "debug" ]; then
+ bbfatal "no package found in ${t} widget directory"
+ elif echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "1" ]; then
+ if [ "$t" = "coverage" -o -f ${S}/test/CMakeLists.txt ]; then
+ bbfatal "no package found in ${t} widget directory"
fi
fi
done