From patchwork Wed Jun 22 10:33:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 9493 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 F2C0FCCA485 for ; Wed, 22 Jun 2022 10:33:51 +0000 (UTC) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web12.5618.1655894023217512764 for ; Wed, 22 Jun 2022 03:33:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GxRhd9xx; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id pk21so10129540ejb.2 for ; Wed, 22 Jun 2022 03:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A+fGtxr4RkgxEb75XnxxvVSugypcXzihlwaNr7IqCKs=; b=GxRhd9xxfm+IKfvkaJLdUNwSratkhzlskdy/TMTz4YUCsej2hL027z/4Rl3oaMPWqp UM9lsc2YgL2xOYpwWaNeYgKIjVbYs7vgrUOrAviGHUsGsmCgGXUXG4tnVJmUDFnSaLkj qqhrVChikwnA+fo1i1LoLbcvaa78cTEzYg3Ua7oN4W2PgZQCOyEheIH8KnANSFD/Yrgb dXSau4NSReWUok7J+lSDkm5AikIytnXrhmm+amFQd+ZNBDiJ7HnGw9q8ycqrccQxG6Os oBHTCCBzDi9IBs+bO9egYWSn9/szTARPigL+5CRa0eEexKo05CvWJbtKDxJ4MsTtJsu1 RqVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A+fGtxr4RkgxEb75XnxxvVSugypcXzihlwaNr7IqCKs=; b=Wuje6JaVt/yfq/eULol+wDG6SulIztfejmSNVDK1cIfC1tZ5hzbaeAm8CM7f/IOlHf ADrLgcpNfpGpc+9SKMKWQdXKzPCL2+t2yj7PvnWxMBMfrjOHVLJqFiQiDycFof3dkrFk /yUs0+PnNNYPF683jI9x7vMgszeITQSSzR741LMh0F3Byjrj5PR4XerLCQiFm3MyFkNy 98wp+5Zy2rdrH0PtPvuNbep80gAy3Y1fl3+KdBhVeKUldsi+FzcyqjRJ/4ePhZDw8js6 0BJIuzL6Mz3F+nCEAZCzEG6+Yx9/2GiDuSySYCSn83s5yLkV9tUyL/VDghGCIjUkVY33 1a4w== X-Gm-Message-State: AJIora8gaA+Skh9E1YBIGFnG2tRr552cBq+/mHzff0/lK4XFQSUnF6jt jf2QUu+mRN2wcCywlMPNkPNd4WMNBJWhTg== X-Google-Smtp-Source: AGRyM1u0nz+1o6C+LvMap7Yrwxn8AGer31+fL8hl+6AfF8SDzGeBDbe05SQsZsPEIu3u1K4drCJgew== X-Received: by 2002:a17:907:3e03:b0:722:e694:438 with SMTP id hp3-20020a1709073e0300b00722e6940438mr2609035ejc.755.1655894021790; Wed, 22 Jun 2022 03:33:41 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (ip-109-090-143-203.um36.pools.vodafone-ip.de. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id lb21-20020a170907785500b007219c20dcd8sm6315826ejc.196.2022.06.22.03.33.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:33:41 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [RFC PATCH 1/6] toolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better replicate (e)SDK Date: Wed, 22 Jun 2022 12:33:07 +0200 Message-Id: <20220622103312.1098389-2-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220622103312.1098389-1-alex@linutronix.de> References: <20220622103312.1098389-1-alex@linutronix.de> 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 ; Wed, 22 Jun 2022 10:33:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167227 Specifically: 1. Place the environment setup file into $B and not into $TMPDIR, so that the recipe using the class can itself better decide what to do with the file. 2. Use global, unified sysroots (provided through build-sysroots recipe) and not recipe-specific ones, as this allows flexible on-the-fly management of what libraries are available to build applications, without having to modify any recipes, similar to eSDK 'extensible' part. 3. Add a few missing settings that have been added to SDK environment files. Signed-off-by: Alexander Kanavin --- meta/classes/toolchain-scripts.bbclass | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 1d7c703748..e46d27ebc7 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -63,22 +63,27 @@ toolchain_create_sdk_env_script () { toolchain_shared_env_script } -# This function creates an environment-setup-script in the TMPDIR which enables +# This function creates an environment-setup-script in B which enables # a OE-core IDE to integrate with the build tree # Caller must ensure CONFIG_SITE is setup toolchain_create_tree_env_script () { - script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} + script=${B}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} rm -f $script touch $script + echo 'standalone_sysroot_target="${STAGING_DIR}/${MACHINE}"' >> $script + echo 'standalone_sysroot_native="${STAGING_DIR}/${BUILD_ARCH}"' >> $script echo 'orig=`pwd`; cd ${COREBASE}; . ./oe-init-build-env ${TOPDIR}; cd $orig' >> $script - echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script - echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script - echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script + echo 'export PATH=$standalone_sysroot_native/${bindir_native}:$standalone_sysroot_native/${bindir_native}/${TARGET_SYS}:$PATH' >> $script + echo 'export PKG_CONFIG_SYSROOT_DIR=$standalone_sysroot_target' >> $script + echo 'export PKG_CONFIG_PATH=$standalone_sysroot_target'"$libdir"'/pkgconfig:$standalone_sysroot_target'"$prefix"'/share/pkgconfig' >> $script echo 'export CONFIG_SITE="${CONFIG_SITE}"' >> $script - echo 'export SDKTARGETSYSROOT=${STAGING_DIR_TARGET}' >> $script - echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script - echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script - echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script + echo 'export SDKTARGETSYSROOT=$standalone_sysroot_target' >> $script + echo 'export OECORE_NATIVE_SYSROOT=$standalone_sysroot_native' >> $script + echo 'export OECORE_TARGET_SYSROOT=$standalone_sysroot_target' >> $script + echo 'export OECORE_ACLOCAL_OPTS="-I $standalone_sysroot_native/usr/share/aclocal"' >> $script + echo 'export OECORE_BASELIB="${baselib}"' >> $script + echo 'export OECORE_TARGET_ARCH="${TARGET_ARCH}"' >>$script + echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script toolchain_shared_env_script } From patchwork Wed Jun 22 10:33:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 9494 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 F29FFCCA47E for ; Wed, 22 Jun 2022 10:33:51 +0000 (UTC) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mx.groups.io with SMTP id smtpd.web09.5891.1655894024757097547 for ; Wed, 22 Jun 2022 03:33:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mw1UiA5u; spf=pass (domain: gmail.com, ip: 209.85.208.49, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f49.google.com with SMTP id fd6so20487221edb.5 for ; Wed, 22 Jun 2022 03:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A9DPE0vwLHHMEmDegh18Iy6FVm/Ysif1VhWWqi0KCB8=; b=mw1UiA5uBID00smWuwiwC2oV7nJX4ACzc+wtPndElu1H8Gg8w+2HDekr4GAuKH3AvZ oQG46Ax0Lxj+8HsopMDBu+AwClzqpYbPLgJ8TlhuP4Y5QlVOa6vT9d/Gzhq2zhblAxnu yDLm1HrVUlwFDbfe9e/GtQ/8uXqfrNYi4OSRcvV8wQQgf1VcVA4U2Q1ZG9v8FD2vlI4L rHPVLwnlVEXJzJl/H0+ShVFjxQZx5pBN6bsUrCYKj2Ik7tpwuo69O+qzCIQHDdEaSxDr CiJkdT1O18Pw2Ds06UzVUFQg1NY9J0F/U+2Uql+2WWuzVZuKEKtyBwGtSa1MbqhhTClc jFoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A9DPE0vwLHHMEmDegh18Iy6FVm/Ysif1VhWWqi0KCB8=; b=U5S4BFsqGaTVUO3R7s987SASO0oQ06uKY8FVwD+hyB7Wbhrb0fdXv76oErCm0EqxnI y5bmHCh9TGzpFbItn08hCViQluisad0Xbymwd5ngxyPjIYAVRNv04n3yIYXMDRBZPGM1 jOFFXAQLvAVX+vkmdEDcBch4j4kSsavYuALHZ9Wq+FuPonYIXf9uofdRIbh2ca9ogUKB 8pgP7ZVfA+Gv2EmAsZlXrPmbMbQGqC8TEmdJgrXvQqJXFmgvH2nRkEYAnwdIevJFzNrF xXdzmKdg7UITWQ6ljo8gB/l5oHeFZuvGb2yz7sPhO6TwXalFd1MMqOpQ5l5JptbkgN5r vOPg== X-Gm-Message-State: AJIora9W1vMNSe12DuozSwZFYGQNmy9JPadh8es8mnCo4YpWOtfSBNbn I5RhjlnLKZFLaUCwA134A/dzx2gTdW9LbQ== X-Google-Smtp-Source: AGRyM1vuNrDyNyrH/CyzugTNGIgrx1P1BG6lv5RifAQGN9NKpWMVe2dRl624+ZaaNpZVRXRXMjnASA== X-Received: by 2002:a05:6402:606:b0:435:72af:4680 with SMTP id n6-20020a056402060600b0043572af4680mr3255838edv.224.1655894023270; Wed, 22 Jun 2022 03:33:43 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (ip-109-090-143-203.um36.pools.vodafone-ip.de. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id lb21-20020a170907785500b007219c20dcd8sm6315826ejc.196.2022.06.22.03.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:33:42 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [RFC PATCH 2/6] meta-ide-support: adjust to provide (e)SDK experience directly in a yocto build Date: Wed, 22 Jun 2022 12:33:08 +0200 Message-Id: <20220622103312.1098389-3-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220622103312.1098389-1-alex@linutronix.de> References: <20220622103312.1098389-1-alex@linutronix.de> 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 ; Wed, 22 Jun 2022 10:33:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167228 Specifically: 1. Add a few more toolchain items to DEPENDS so they're available in the recipe sysroot. 2. Use deploy mechanism to place the SDK environment setup file and testdata for testing it into the image deploy directory. 3. Add ability to run SDK tests via the testsdk class and task. This also requires providing a testdata json file. 4. Ensure sysroot population always runs, as those items are mean to be picked up by 'bitbake build-sysroots' into the unified sysroot. Signed-off-by: Alexander Kanavin --- meta/recipes-core/meta/meta-ide-support.bb | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb index 39317d50e0..3d480c71d4 100644 --- a/meta/recipes-core/meta/meta-ide-support.bb +++ b/meta/recipes-core/meta/meta-ide-support.bb @@ -2,11 +2,13 @@ SUMMARY = "Integrated Development Environment support" DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE" LICENSE = "MIT" -DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native cmake-native" +DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native cmake-native autoconf-native automake-native meson-native intltool-native pkgconfig-native" PR = "r3" RM_WORK_EXCLUDE += "${PN}" -inherit toolchain-scripts nopackages +inherit toolchain-scripts nopackages deploy testsdk + +TESTSDK_CLASS_NAME = "oeqa.sdk.testmetaidesupport.TestSDK" do_populate_ide_support () { toolchain_create_tree_env_script @@ -18,4 +20,22 @@ python () { d.appendVarFlag("do_populate_ide_support", "file-checksums", " " + " ".join(searched)) } -addtask populate_ide_support before do_build after do_install +addtask populate_ide_support before do_deploy after do_install + +python do_write_test_data() { + from oe.data import export2json + + out_dir = d.getVar('B') + testdata_name = os.path.join(out_dir, "%s.testdata.json" % d.getVar('PN')) + + export2json(d, testdata_name) +} +addtask write_test_data before do_deploy after do_install + +do_deploy () { + install ${B}/* ${DEPLOYDIR} +} + +addtask deploy before do_build + +do_prepare_recipe_sysroot[nostamp] = "1" From patchwork Wed Jun 22 10:33:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 9492 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 D1E24CCA481 for ; Wed, 22 Jun 2022 10:33:51 +0000 (UTC) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mx.groups.io with SMTP id smtpd.web12.5620.1655894025982636574 for ; Wed, 22 Jun 2022 03:33:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=msuqcAsH; spf=pass (domain: gmail.com, ip: 209.85.218.47, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id t5so732802eje.1 for ; Wed, 22 Jun 2022 03:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fVzUdEQtYCEMNZ4BkUSf64NYSOpz4gqJg7Pl22v6FgU=; b=msuqcAsHW5xiMMrJo6QLeR6EzIW9D5qPao/WYwhEnAqO84ybPLgwhkWKGX3K67uIwo dIiW3jmdWvF06RpUWPk+9vx04ClkdNozzuxBV/iyLgbX7Nx+BdqVF1PZ/BdYxq88NLnd NzBN/tq0kCQnmuplpo9PzC7XTsJ7Mt4SH/cj5s7IBmqaJuAbPAGVurnmGwy9j3U9lFjb LtpUfp7IHQdKXYvABfRaUH5sMAmoi3XjOVXyvUVCZpGmiswEPZqD/pNpAtL7EkB8gGmc YVS0i+SwhyzgdAVVT6WDjo5+WI3h8qc0u2YZ4n5luh/EKgmvetBG20Y+u6e7LFUQPGDD Zm3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fVzUdEQtYCEMNZ4BkUSf64NYSOpz4gqJg7Pl22v6FgU=; b=LuLerovwxrs+T7Ovi5P79pn3KaNXKPgA3yejrwssGGcFcwMrFXufoFODTr6+bAorkG 5/0k1gxqRi54iE6SI3P/Hl2JsGPMlBjbO7gEcroceUauapgLpCY4XlFOvvpyULrKiUn0 RrcmjBNt6nrnkqflxYPvT4jMbci+Aso6li+xf44V9ikBMwdx77oCJyaLNBKxHEJaesO0 jxRpDYzYpLApDl50tyUl7k5R46R+7yPr2nAlz0fNfTLQV9V5vezkvb+9jWlSikUDfgbe T6jBy/gpZfUP1CJaRcUuZhG998zRugx+NW5ouqUAVtBaQk8gABLwlU8AIdZ+26/2RZlz 75Mw== X-Gm-Message-State: AJIora808qYJ36dy6WNoUdy/pIVa/wiO6MbXqP8Y1NaaT8fFZY1RCzgX lf3FWtEIFj8yTAIvhVY+vijeiq/pvtLg+g== X-Google-Smtp-Source: AGRyM1srfs3Uz8F5uiNqwRdUtHl2gPLBNEZQzHPwN+X1ridPaTeT8LBqX78OgQW4V01OFp8hX91Hcg== X-Received: by 2002:a17:907:a064:b0:711:c819:3cbf with SMTP id ia4-20020a170907a06400b00711c8193cbfmr2632681ejc.460.1655894024360; Wed, 22 Jun 2022 03:33:44 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (ip-109-090-143-203.um36.pools.vodafone-ip.de. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id lb21-20020a170907785500b007219c20dcd8sm6315826ejc.196.2022.06.22.03.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:33:43 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [RFC PATCH 3/6] oeqa/sdk: add a test class for running SDK tests directly in a Yocto build Date: Wed, 22 Jun 2022 12:33:09 +0200 Message-Id: <20220622103312.1098389-4-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220622103312.1098389-1-alex@linutronix.de> References: <20220622103312.1098389-1-alex@linutronix.de> 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 ; Wed, 22 Jun 2022 10:33:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167230 This is a simpler version of the same class in testsdk.py, as it does not need to unpack and set up the SDK, and can proceed to the tests straight away. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/sdk/testmetaidesupport.py | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 meta/lib/oeqa/sdk/testmetaidesupport.py diff --git a/meta/lib/oeqa/sdk/testmetaidesupport.py b/meta/lib/oeqa/sdk/testmetaidesupport.py new file mode 100644 index 0000000000..2ff76fd8e0 --- /dev/null +++ b/meta/lib/oeqa/sdk/testmetaidesupport.py @@ -0,0 +1,43 @@ +# +# SPDX-License-Identifier: MIT +# + +class TestSDK(object): + def run(self, d): + import json + import logging + from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor + from oeqa.utils import make_logger_bitbake_compatible + + pn = d.getVar("PN") + + logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) + + sdk_dir = d.expand("${WORKDIR}/testsdk/") + bb.utils.remove(sdk_dir, True) + bb.utils.mkdirhier(sdk_dir) + + sdk_envs = OESDKTestContextExecutor._get_sdk_environs(d.getVar("DEPLOY_DIR_IMAGE")) + tdname = d.expand("${DEPLOY_DIR_IMAGE}/${PN}.testdata.json") + test_data = json.load(open(tdname, "r")) + + host_pkg_manifest = {"cmake-native":"", "gcc-cross":"", "gettext-native":"", "meson-native":"", "perl-native":"", "python3-core-native":"", } + target_pkg_manifest = {"gtk+3":""} + + for s in sdk_envs: + bb.plain("meta-ide-support based SDK testing environment: %s" % s) + + sdk_env = sdk_envs[s] + + tc = OESDKTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir, + sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest, + host_pkg_manifest=host_pkg_manifest) + + tc.loadTests(OESDKTestContextExecutor.default_cases) + + results = tc.runTests() + if results: + results.logSummary(pn) + + if (not results) or (not results.wasSuccessful()): + bb.fatal('%s - FAILED' % (pn,), forcelog=True) From patchwork Wed Jun 22 10:33:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 9491 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 D2046CCA483 for ; Wed, 22 Jun 2022 10:33:51 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by mx.groups.io with SMTP id smtpd.web11.5653.1655894022402083039 for ; Wed, 22 Jun 2022 03:33:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o91XqR8C; spf=pass (domain: gmail.com, ip: 209.85.208.43, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f43.google.com with SMTP id eo8so23303940edb.0 for ; Wed, 22 Jun 2022 03:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Eo8/XsyRswPrP5txETahSKh/CzkDHY6Z8B0UBfKQpdk=; b=o91XqR8C1JjaPcGDqkUdcxHoUHPwIe3geilqGPgXudwOrEz3rG9aGcWXvOzDA3APUI ergaS/Ifa4d4QatK6kTMz5Z++qzI6vkMLG7tbf9dF3dLh4tS9hYZ9u+q4wjj3hGvAvzY EcNXI7hGZ7Pl7btXxnY65iFPGA3sny0dKhaS70Kq7bVpB+hu/MrI7MzmcbZllCmpx0iB oKNT+7uQf5WQAlKQ8EWOGlTyffawvTsaJZEE4u5B22CD+J7HsXySd//ya33JDR3sPXHL DXEwbNrxDOJllyyEejfHENyy8shIoNCXWOcTt/arryF6LBw0p8acGVovU+kcAkLPGDAI Wt1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Eo8/XsyRswPrP5txETahSKh/CzkDHY6Z8B0UBfKQpdk=; b=AwGMpiyZBuHxdv7lrVGHBSAsHywhY8SVXAxcSQodMMCCv8XxbJ0XBNsBktmuTIi3c6 pDjmCBQJgMVmvA6HTdxDKy5lT0DWk29oofc1Zf8pG8oKI66YDFNkDDcbW7kLBVhND/Z9 Q8Z1COcBTCm400IMxDf06aOisxGbVwJATPiIUtMxyl/4JjRNSpWX3g2dwpzseGppSulv QW4cgraxHPoF9TFzQ6Jql997lPIGUpczs2g/i0SqQP+29v9ZADuJiqliHRPr6unQWtvA 22hYuiyAMyIXk3FlCWg3pLmXXvVJmCKGPameoA9Z8ZyVMNpa2JJW6rODDdKxryj3NhRe JwgA== X-Gm-Message-State: AJIora84Na5hT58QPkx+iz2p15Kpx5y9w8auDsqxsMY5c9B77JlAcn+F hSq79v375YP8eJfHeYx5+8DpUoPthAuLXQ== X-Google-Smtp-Source: AGRyM1v70EK/qxJIE8f8PZP/F7NTvjTJE084zOtcJt3ACzfug/dH6osjlS6xnt9CDX2pK/kuu3afpw== X-Received: by 2002:a05:6402:2752:b0:433:3a08:27b1 with SMTP id z18-20020a056402275200b004333a0827b1mr3302535edd.235.1655894025208; Wed, 22 Jun 2022 03:33:45 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (ip-109-090-143-203.um36.pools.vodafone-ip.de. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id lb21-20020a170907785500b007219c20dcd8sm6315826ejc.196.2022.06.22.03.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:33:44 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [RFC PATCH 4/6] selftest/meta_ide: add a test for running SDK tests Date: Wed, 22 Jun 2022 12:33:10 +0200 Message-Id: <20220622103312.1098389-5-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220622103312.1098389-1-alex@linutronix.de> References: <20220622103312.1098389-1-alex@linutronix.de> 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 ; Wed, 22 Jun 2022 10:33:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167229 This also shows how the SDK workflow inside a Yocto build works: bitbake meta-ide-support bitbake -c populate_sysroot gtk+3 (or any other needed target/native item for development) bitbake build-sysroots . tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux And voila: just the same environment as the (e)SDK. Adjust the location of environment script to be in deploy dir, not in tmp dir. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/selftest/cases/meta_ide.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py index 6f10d30dc9..ce7bba401d 100644 --- a/meta/lib/oeqa/selftest/cases/meta_ide.py +++ b/meta/lib/oeqa/selftest/cases/meta_ide.py @@ -16,13 +16,14 @@ class MetaIDE(OESelftestTestCase): def setUpClass(cls): super(MetaIDE, cls).setUpClass() bitbake('meta-ide-support') - bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'TMPDIR', 'COREBASE']) + bitbake('build-sysroots') + bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'DEPLOY_DIR_IMAGE', 'COREBASE']) cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS'] - cls.tmpdir = bb_vars['TMPDIR'] - cls.environment_script_path = '%s/%s' % (cls.tmpdir, cls.environment_script) + cls.deploydir = bb_vars['DEPLOY_DIR_IMAGE'] + cls.environment_script_path = '%s/%s' % (cls.deploydir, cls.environment_script) cls.corebasedir = bb_vars['COREBASE'] cls.tmpdir_metaideQA = tempfile.mkdtemp(prefix='metaide') - + @classmethod def tearDownClass(cls): shutil.rmtree(cls.tmpdir_metaideQA, ignore_errors=True) @@ -49,3 +50,8 @@ class MetaIDE(OESelftestTestCase): msg="Running make failed") self.assertEqual(self.project.run_install(), 0, msg="Running make install failed") + + def test_meta_ide_can_run_sdk_tests(self): + bitbake('-c populate_sysroot gtk+3') + bitbake('build-sysroots') + bitbake('-c testsdk meta-ide-support') From patchwork Wed Jun 22 10:33:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 9490 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 BFE0DCCA47D for ; Wed, 22 Jun 2022 10:33:51 +0000 (UTC) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mx.groups.io with SMTP id smtpd.web11.5654.1655894027876612005 for ; Wed, 22 Jun 2022 03:33:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=O8xFhuwR; spf=pass (domain: gmail.com, ip: 209.85.218.50, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f50.google.com with SMTP id h23so33201323ejj.12 for ; Wed, 22 Jun 2022 03:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S2gGM0nCMacGqlv+UkTB3wEJ1JPOUOjxGo4Pn03f78o=; b=O8xFhuwR1xptBGBCFHp7/uIV0oCCBHuZcMmbd3t8M9Rn/oarB1LPorHhVDfayJGQJ5 zglhF8q4WNZNra9VpX7aTkoDAmwC60dNy9AJtcPgnKCT2G+6U/Ct6SRCGp8v3NDPqmKI C+sJizp314RocATXrPP6HcgNDyzVLdUqiK3NZz9pkN6ploVgq24KMJL0yrAWaoKUVCrY 3vyTpKjQF/vn6fML4G9kS+hCxa0aaEL+VTwvHaS0LoPbA4rak/lCM3vvYmim5fojSU7G vksTnak6TDoLswJt1rpWsDTXcqOQgxRLXsDJPZ6cvdbeuY4tbF6ZXp9ggxcSZw4S/5u2 Tunw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S2gGM0nCMacGqlv+UkTB3wEJ1JPOUOjxGo4Pn03f78o=; b=G2OmIkd7kdA8MEKSCdps1EjBLaBaF+74Hofw+aSd32135Vroejn0Jm4foff+Bf72Nh HPp1vEEYdcn5dM72U41dfwoxeBpR4sA1nDE274sDbAeWlbXo/xbHcExXsOUHIu4qibFA 4ebDOwUkk8JIM2nJvxOY965FbiQ/Yrh/WJhP8NJGA8Mnxeo5sA9GKJnML7T4oPKtqLVM 8WBhsPAF3UsITgmZ8BP186L8fQFwcMOtlxgMxWdiOLAHYIAMCwjL2CxsIzfXyoLWnsIx iKm1rjuCI+yf9vR5RhHphVKoKjbGjQeihbA9a6Q4DCY9u5cAUjPTCLC4hg5st3dRn1kW h92g== X-Gm-Message-State: AJIora9K7H3K+e0UN4Jn39gps9VXnDAsyObRXi1RguMcmcCrsCPGfHLM lJtluDF9eoavwl+uN8+1bzafbWexg1k+Gw== X-Google-Smtp-Source: AGRyM1uAj1amHco2hdS68YFsJ8hxthHzY3I+rX71/1hz630zpp9QfM/WFSn3xBv5Z4VOuzyOoe02hA== X-Received: by 2002:a17:906:561a:b0:711:cfa2:6a35 with SMTP id f26-20020a170906561a00b00711cfa26a35mr2543483ejq.251.1655894026366; Wed, 22 Jun 2022 03:33:46 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (ip-109-090-143-203.um36.pools.vodafone-ip.de. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id lb21-20020a170907785500b007219c20dcd8sm6315826ejc.196.2022.06.22.03.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:33:45 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [RFC PATCH 5/6] oeqa/sdk: allow epoxy/galculator tests to run in esdk and direct yocto builds Date: Wed, 22 Jun 2022 12:33:11 +0200 Message-Id: <20220622103312.1098389-6-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220622103312.1098389-1-alex@linutronix.de> References: <20220622103312.1098389-1-alex@linutronix.de> 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 ; Wed, 22 Jun 2022 10:33:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167231 Other tests already have similar tweaks. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/sdk/cases/buildepoxy.py | 3 ++- meta/lib/oeqa/sdk/cases/buildgalculator.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/buildepoxy.py index f69f720cd6..ad08b777f2 100644 --- a/meta/lib/oeqa/sdk/cases/buildepoxy.py +++ b/meta/lib/oeqa/sdk/cases/buildepoxy.py @@ -16,7 +16,8 @@ class EpoxyTest(OESDKTestCase): Test that Meson builds correctly. """ def setUp(self): - if not (self.tc.hasHostPackage("nativesdk-meson")): + if not (self.tc.hasHostPackage("nativesdk-meson") or + self.tc.hasHostPackage("meson-native")): raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson") def test_epoxy(self): diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/buildgalculator.py index eb3c8ddf39..58ade920c9 100644 --- a/meta/lib/oeqa/sdk/cases/buildgalculator.py +++ b/meta/lib/oeqa/sdk/cases/buildgalculator.py @@ -19,7 +19,8 @@ class GalculatorTest(OESDKTestCase): if not (self.tc.hasTargetPackage("gtk+3", multilib=True) or \ self.tc.hasTargetPackage("libgtk-3.0", multilib=True)): raise unittest.SkipTest("GalculatorTest class: SDK don't support gtk+3") - if not (self.tc.hasHostPackage("nativesdk-gettext-dev")): + if not (self.tc.hasHostPackage("nativesdk-gettext-dev") or + self.tc.hasHostPackage("gettext-native")): raise unittest.SkipTest("GalculatorTest class: SDK doesn't contain gettext") def test_galculator(self): From patchwork Wed Jun 22 10:33:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 9489 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 C2691C433EF for ; Wed, 22 Jun 2022 10:33:51 +0000 (UTC) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.groups.io with SMTP id smtpd.web12.5621.1655894029141564040 for ; Wed, 22 Jun 2022 03:33:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HySAZUTD; spf=pass (domain: gmail.com, ip: 209.85.218.51, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f51.google.com with SMTP id ge10so1715346ejb.7 for ; Wed, 22 Jun 2022 03:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NdJGN94sJgMEjCZ5+UXG6f7F/CjelYO96tsB7flNPJA=; b=HySAZUTDHqIexPYenoMTr61lgKxiUq6+jt2ohS64KFrg+M80tz+hvh7v+REKH83YcB nGOO3Ys46Oa5McW3TkN/mGevuwEAFeIIGyDg4LUR0plAOOP7x6Pm5EPb6zHsmCtCS26+ BSkoGsYV7RyHejgLlbNHs20Q8UYOYCCu4jdvopBBuCcVhXa6Ac+MJ83azasNS2/d3F+4 96vRADKVVjMmnI8QXOlYxGGTdbDCN+tBtMzM7K+VcbVxk80REK5/vqj4AjzsApSSkZzy gmnEEPnZz/vBJR9fGnSbC4zIpj9M6HCyoZE7+wrcrZoB08V8jru3/89VZTbv/GhYS7wM Tmaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NdJGN94sJgMEjCZ5+UXG6f7F/CjelYO96tsB7flNPJA=; b=JZ8WPDUiL8XX4bV40IECkwAOBiKwumiu7nWDMidVrAExGDhXdROf9un2ayIHV6w4IH 9xawS06ow24ylkR0lGEZuk6r3F/Gr4LF6G8Y9MgSwTbr1M5ns1ggLrteOKf/4Bxu2bT4 ipSXIP6citWK3j3NuawzSyV3S4YMuOJhus94UQJDsWyNnGrf9F9tsFn0Douk0i7dnXUZ c9t6ixqGiRCj3gKn7o/Nm2P0YjqHVS1WKSkx7E3DFW40ya7xKtSyL7g+56Wttq9NHgjB HdBGVSKJ7NqehxcNJToI7+rt9nMyWYScJQXzEQFXKuefiuDph95zR2AXXW4XNFaMNWoc TmIQ== X-Gm-Message-State: AJIora/rVXjMJD2m1N7s5j1Gk0xRgegNHGPvlCkrFfqQDiYfF2au/9Pc o7Kl44iWPXz76l6+P2LLxda4nqCHjajz1Q== X-Google-Smtp-Source: AGRyM1tPkcJysFqtWO6rJP2qTaVKJcg7apiSMCdx57L7C/m8Oc4lrr5bhaGCRA33waTKwcLQ9IW8Zg== X-Received: by 2002:a17:907:94c2:b0:722:e542:12 with SMTP id dn2-20020a17090794c200b00722e5420012mr2461275ejc.119.1655894027779; Wed, 22 Jun 2022 03:33:47 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (ip-109-090-143-203.um36.pools.vodafone-ip.de. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id lb21-20020a170907785500b007219c20dcd8sm6315826ejc.196.2022.06.22.03.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 03:33:46 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [RFC PATCH 6/6] oeqa/sdk: drop the nativesdk-python 2.x test Date: Wed, 22 Jun 2022 12:33:12 +0200 Message-Id: <20220622103312.1098389-7-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220622103312.1098389-1-alex@linutronix.de> References: <20220622103312.1098389-1-alex@linutronix.de> 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 ; Wed, 22 Jun 2022 10:33:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/167232 Python 2.x has been EOL for a while, and so this test never runs. Signed-off-by: Alexander Kanavin --- meta/lib/oeqa/sdk/cases/python.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py index a334abce5f..d43354c32a 100644 --- a/meta/lib/oeqa/sdk/cases/python.py +++ b/meta/lib/oeqa/sdk/cases/python.py @@ -8,17 +8,6 @@ from oeqa.sdk.case import OESDKTestCase from oeqa.utils.subprocesstweak import errors_have_output errors_have_output() -class Python2Test(OESDKTestCase): - def setUp(self): - if not (self.tc.hasHostPackage("nativesdk-python-core") or - self.tc.hasHostPackage("python-core-native")): - raise unittest.SkipTest("No python package in the SDK") - - def test_python2(self): - cmd = "python -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\"" - output = self._run(cmd) - self.assertEqual(output, "Hello, world\n") - class Python3Test(OESDKTestCase): def setUp(self): if not (self.tc.hasHostPackage("nativesdk-python3-core") or