From 69646f5957558b85d5960c4ab1c1f7b052964a48 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 8 Jun 2020 19:14:07 -0400 Subject: 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 Change-Id: I9d814894684b525f774f730c8e94e1c46cda16ce Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/24677 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account --- meta-app-framework/classes/aglwgt.bbclass | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'meta-app-framework') 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" -- cgit 1.2.3-korg