From patchwork Fri Sep 27 15:57:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 49687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E111CDD1C8 for ; Fri, 27 Sep 2024 15:57:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.72753.1727452628967841477 for ; Fri, 27 Sep 2024 08:57:09 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ED7D214BF for ; Fri, 27 Sep 2024 08:57:37 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1CA733F6A8 for ; Fri, 27 Sep 2024 08:57:07 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/3] CI: add KAS_BUILD_DIR variable Date: Fri, 27 Sep 2024 16:57:03 +0100 Message-Id: <20240927155705.1121586-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 27 Sep 2024 15:57:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6132 Instead of always using KAS_WORK_DIR/build to refer to the build tree, on the assumption that is where the build tree is, export KAS_BUILD_DIR and use that variable instead. Signed-off-by: Ross Burton --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8627731..bca957fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,13 +34,14 @@ stages: interruptible: true variables: KAS_WORK_DIR: $CI_PROJECT_DIR/work + KAS_BUILD_DIR: $KAS_WORK_DIR/build KAS_REPO_REF_DIR: $CACHE_DIR/repos SSTATE_DIR: $CACHE_DIR/sstate DL_DIR: $CACHE_DIR/downloads BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml TOOLCHAIN_DIR: $CACHE_DIR/toolchains - IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images - TOOLCHAIN_LINK_DIR: $CI_PROJECT_DIR/work/build/toolchains + IMAGE_DIR: $KAS_BUILD_DIR/tmp/deploy/images + TOOLCHAIN_LINK_DIR: $KAS_BUILD_DIR/toolchains before_script: - echo KAS_WORK_DIR = $KAS_WORK_DIR - echo SSTATE_DIR = $SSTATE_DIR @@ -75,13 +76,13 @@ stages: - echo KASFILES=$KASFILES - kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES - kas build $KASFILES - - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log + - ./ci/check-warnings $KAS_BUILD_DIR/warnings.log artifacts: name: "logs" when: always paths: - - $CI_PROJECT_DIR/work/build/tmp*/work*/**/temp/log.do_*.* - - $CI_PROJECT_DIR/work/build/tmp*/work*/**/testimage/* + - $KAS_BUILD_DIR/tmp*/work*/**/temp/log.do_*.* + - $KAS_BUILD_DIR/tmp*/work*/**/testimage/* # # Prep stage, update repositories once. From patchwork Fri Sep 27 15:57:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 49686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F0CBCDD1C9 for ; Fri, 27 Sep 2024 15:57:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.72754.1727452629431239609 for ; Fri, 27 Sep 2024 08:57:09 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9385214BF for ; Fri, 27 Sep 2024 08:57:38 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B87B73F6A8 for ; Fri, 27 Sep 2024 08:57:08 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/3] CI: remove duplicate arm-systemready-ir-acs Date: Fri, 27 Sep 2024 16:57:04 +0100 Message-Id: <20240927155705.1121586-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240927155705.1121586-1-ross.burton@arm.com> References: <20240927155705.1121586-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 27 Sep 2024 15:57:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6133 We had two instances of the same job, so consolidate them into one. Signed-off-by: Ross Burton --- .gitlab-ci.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bca957fe..01f3539f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,7 @@ arm-systemready-ir-acs: # arm-systemready-ir-acs must be specified after fvp-base for ordering # purposes for the jobs-to-kas output. It is not enough to just have it # in the job name because fvp-base.yml overwrites the target. - - PLATFORM: fvp-base + - PLATFORM: [fvp-base, corstone1000-fvp] ARM_SYSTEMREADY_IR_ACS: arm-systemready-ir-acs tags: - ${ACS_TAG} @@ -197,19 +197,6 @@ fvp-base: TESTING: testimage - SYSTEMREADY_FIRMWARE: arm-systemready-firmware -arm-systemready-ir-acs: - extends: .build - timeout: 12h - parallel: - matrix: - # arm-systemready-ir-acs must be specified after fvp-base for ordering - # purposes for the jobs-to-kas output. It is not enough to just have it - # in the job name because fvp-base.yml overwrites the target. - - PLATFORM: [fvp-base, corstone1000-fvp] - ARM_SYSTEMREADY_IR_ACS: arm-systemready-ir-acs - tags: - - ${ACS_TAG} - fvps: extends: .build From patchwork Fri Sep 27 15:57:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 49688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7424ACDD1C4 for ; Fri, 27 Sep 2024 15:57:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.72755.1727452630083726179 for ; Fri, 27 Sep 2024 08:57:10 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 39AF814BF for ; Fri, 27 Sep 2024 08:57:39 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5F26B3F6A8 for ; Fri, 27 Sep 2024 08:57:09 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/3] CI: transform testimage reports into JUnit XML reports Date: Fri, 27 Sep 2024 16:57:05 +0100 Message-Id: <20240927155705.1121586-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240927155705.1121586-1-ross.burton@arm.com> References: <20240927155705.1121586-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 27 Sep 2024 15:57:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6134 Using resulttool we can transform the oeqa JSON reports into JUnit XML, which GitLab can display in pipelines and merge requests. Signed-off-by: Ross Burton --- .gitlab-ci.yml | 4 ++++ ci/junit.sh | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 ci/junit.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01f3539f..e37f9d20 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,12 +77,16 @@ stages: - kas dump --update --force-checkout --resolve-refs --resolve-env $KASFILES - kas build $KASFILES - ./ci/check-warnings $KAS_BUILD_DIR/warnings.log + - kas shell ci/base.yml:lockfile.yml --command "$CI_PROJECT_DIR/ci/junit.sh $KAS_WORK_DIR/build" + artifacts: name: "logs" when: always paths: - $KAS_BUILD_DIR/tmp*/work*/**/temp/log.do_*.* - $KAS_BUILD_DIR/tmp*/work*/**/testimage/* + reports: + junit: $KAS_BUILD_DIR/tmp/log/oeqa/junit.xml # # Prep stage, update repositories once. diff --git a/ci/junit.sh b/ci/junit.sh new file mode 100755 index 00000000..6262c34b --- /dev/null +++ b/ci/junit.sh @@ -0,0 +1,15 @@ +#! /bin/bash + +# $ ci/junit.sh +# +# If there is a OEQA test report in JSON format present in the build directory, +# transform it to JUnit XML using resulttool. + +set -e -u + +BUILDDIR=$1 +JSON=$BUILDDIR/tmp/log/oeqa/testresults.json + +if test -f $JSON; then + resulttool junit $JSON +fi