summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-06-08 19:14:07 -0400
committerScott Murray <scott.murray@konsulko.com>2020-06-10 01:45:46 +0000
commit69646f5957558b85d5960c4ab1c1f7b052964a48 (patch)
tree4b9b464e408aedbf71513efb58a24fc73352d666
parentef5baf1c21c1ad6567614f2bc07565c2e1827604 (diff)
meta-app-framework: aglwgt.bbclass fixes
Changes include: - AGLWGT_EXTRA_BUILD_ARGS definition reworked to pass PARALLEL_MAKE in as BUILD_ARGS, as that gets it down to where it needs to go to be useful in most of the autobuild scripts/makefiles. - The logic has been tweaked in do_aglwgt_package to only try to build the coverage version of widgets for things that have test widgets. This avoids build and packaging complications with applications, and seems reasonable ATM given there are no plans to attempt coverage for non-bindings. - A widget not being present after calling "autobuild package" has been bumped to bbfatal instead of bbwarn for the release widget to immediately flag errors. - "-maxdepth 1" has been added to the find commands used to check for widget presence to avoid picking up stray .wgt files outside of the immediate target build directory. Bug-AGL: SPEC-3300 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I9d814894684b525f774f730c8e94e1c46cda16ce Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/24677 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>
-rw-r--r--meta-app-framework/classes/aglwgt.bbclass32
1 files changed, 16 insertions, 16 deletions
diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass
index b5f7be8bf..1a769924b 100644
--- a/meta-app-framework/classes/aglwgt.bbclass
+++ b/meta-app-framework/classes/aglwgt.bbclass
@@ -28,7 +28,7 @@ EXTRA_OECMAKE_append = " -DCMAKE_BUILD_TYPE=RELEASE"
# FIXME: Remove once CMake+ninja issues are resolved
OECMAKE_GENERATOR = "Unix Makefiles"
-AGLWGT_EXTRA_BUILD_ARGS = "VERBOSE=TRUE ${PARALLEL_MAKE}"
+AGLWGT_EXTRA_BUILD_ARGS = 'VERBOSE=TRUE BUILD_ARGS="${PARALLEL_MAKE}"'
# Only widgets with recipe names starting with agl-service- are
# assumed to have tests by default, set this to "true" to force
@@ -62,24 +62,24 @@ do_aglwgt_package() {
bbwarn "Target: package failed"
fi
+ mkdir -p ${S}/build-debug
+ cd ${S}/build-debug
+ if ! $bldcmd package-debug BUILD_DIR=${S}/build-debug DEST=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS}; then
+ bbwarn "Target: package-debug failed"
+ fi
+
if echo ${BPN} | grep -q '^agl-service-' || [ "${AGLWGT_HAVE_TESTS}" = "true" ]; then
mkdir -p ${S}/build-test
cd ${S}/build-test
if ! $bldcmd package-test BUILD_DIR=${S}/build-test DEST=${B}/build-test ${AGLWGT_EXTRA_BUILD_ARGS}; then
bbwarn "Target: package-test failed"
fi
- fi
- mkdir -p ${S}/build-debug
- cd ${S}/build-debug
- if ! $bldcmd package-debug BUILD_DIR=${S}/build-debug DEST=${B}/build-debug ${AGLWGT_EXTRA_BUILD_ARGS}; then
- bbwarn "Target: package-debug failed"
- fi
-
- mkdir -p ${S}/build-coverage
- cd ${S}/build-coverage
- if ! $bldcmd package-coverage BUILD_DIR=${S}/build-coverage DEST=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS}; then
- bbwarn "Target: package-coverage failed"
+ mkdir -p ${S}/build-coverage
+ cd ${S}/build-coverage
+ if ! $bldcmd package-coverage BUILD_DIR=${S}/build-coverage DEST=${B}/build-coverage ${AGLWGT_EXTRA_BUILD_ARGS}; then
+ bbwarn "Target: package-coverage failed"
+ fi
fi
}
@@ -98,19 +98,19 @@ do_aglwgt_deploy() {
DEST=manualinstall
fi
- if [ "$(find ${B}/build-release -name '*.wgt')" ]; then
+ if [ "$(find ${B}/build-release -name '*.wgt' -maxdepth 1)" ]; then
install -d ${D}/usr/AGL/apps/$DEST
install -m 0644 ${B}/build-release/*.wgt ${D}/usr/AGL/apps/$DEST/
else
- bberror "no package found in widget directory"
+ bbfatal "no package found in widget directory"
fi
for t in test debug coverage; do
- if [ "$(find ${B}/build-${t} -name *-${t}.wgt)" ]; then
+ 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}" = "true" ]; then
- if [ "$t" != "test" ]; 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}" = "true" ]; then
bbwarn "no package found in ${t} widget directory"