From patchwork Fri Jul 22 18:39: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: 10535 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 05705C43334 for ; Fri, 22 Jul 2022 18:39:38 +0000 (UTC) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mx.groups.io with SMTP id smtpd.web11.11457.1658515167864888721 for ; Fri, 22 Jul 2022 11:39:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=STI7n4A7; spf=pass (domain: gmail.com, ip: 209.85.218.45, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f45.google.com with SMTP id bp15so10010873ejb.6 for ; Fri, 22 Jul 2022 11:39:27 -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:mime-version :content-transfer-encoding; bh=CZ7O/lVz7iG5tzI+KqS10McRb3q0eu+CXiiRrpWfzJg=; b=STI7n4A71in9UgEzmtCqrbOY/PwHegmKb1SGqee7vxY/umIFGU9h+iBGKL2TEdwHXf 2UIbAUFxbHFSaYs5PcwzbgnP/M9cTn3q8NxDRqiL1fALjnMwAKkZW4olrcCt/tvEIm22 Eh+ZZC4AnY/xuXvf7ItpeX3WGXlznQlIgQ31Vxbo3JCZhlrAPqiO1zWHyb4PH5MyDRit ukbADYjke57bsamcTSpf0Ar49wTrv3RssOXZ2UMD/VPIZOpBTLOEZD6Aoaxikx54fBT8 O4H8i7J//ASlMVWizEK1erdD1cN19hnu4GZXjLdtLqpogjdBUmBYSSzYOx5dYLqX80oz rMiA== 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:mime-version :content-transfer-encoding; bh=CZ7O/lVz7iG5tzI+KqS10McRb3q0eu+CXiiRrpWfzJg=; b=Hi0vRyFGHupz89GCM6wuymQ/DujRhfJoMyocDv1uSgXrsfbOJHz4NFJx09drhDBLtk HA7OHz89mrBQOMnypGvisbgfv1D778wZm6+RZJq9be7CoJcjhNneZoHnO3vM6duyhZvZ ONmiWJIEfMaCH8uSa9HcgWZlg4EMBCjbhjDzxfNshuXLt1C0FFTGX63Y4lBqEr1eS4e0 U1z9ZPxqzGmcmKZydIuQEj68bcVZT6ht9gH10prlRzteicARPMRUp0rwfIQKmrVg/ADf l5N1oq5GjhoL2z3ZiEXJKV16kcRTdSDgwafo0MV4yrh1IIlspXVgjHpj6lakufSI4oAv TJ1g== X-Gm-Message-State: AJIora9xwk/hr0EF3Ehpv+yotVoiDx2q4wMOY1wbLGX+xStbIFp/riL7 84Fg7oInOP3HqvTrf9Mfen68obVsOTU= X-Google-Smtp-Source: AGRyM1td7uvqZ8vDQdPtA3aMvwl/1z+NgbBpphlYW7AVy+PDD+iaELOd180OCpCO6parwfrFkS1rqA== X-Received: by 2002:a17:907:7395:b0:72e:e6c4:53d9 with SMTP id er21-20020a170907739500b0072ee6c453d9mr936220ejc.42.1658515166255; Fri, 22 Jul 2022 11:39:26 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id bt8-20020a0564020a4800b0043bba5ed21csm2931885edb.15.2022.07.22.11.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:39:25 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 1/6] toolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better replicate (e)SDK Date: Fri, 22 Jul 2022 20:39:11 +0200 Message-Id: <20220722183916.360600-1-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 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, 22 Jul 2022 18:39:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168418 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. This also requires adjustment of the sstate sametune_samegsigs test, as meta-ide-support becomes dependent on $MACHINE (unified sysroots have it in their paths) and needs to be excluded from the test. 3. Add a few missing settings that have been added to SDK environment files. 4. Add a snippet to the environment setup file that also runs the relocation scripts. In regular SDKs this is executed by the SDK installer, in direct SDK we can do it when setting up the environment. Signed-off-by: Alexander Kanavin --- meta/classes/toolchain-scripts.bbclass | 40 ++++++++++++++++----- meta/lib/oeqa/selftest/cases/sstatetests.py | 2 +- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 1d7c703748..16f1e17607 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -63,24 +63,46 @@ 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 + + cat >> $script <&2 + exit \$status + fi + done +fi +EOF } toolchain_shared_env_script () { diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 4749f28ab8..63827f3068 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py @@ -444,7 +444,7 @@ BB_SIGNATURE_HANDLER = "OEBasicHash" f = [] for root, dirs, files in os.walk(d): for name in files: - if "meta-environment" in root or "cross-canadian" in root: + if "meta-environment" in root or "cross-canadian" in root or 'meta-ide-support' in root: continue if "qemux86copy-" in root or "qemux86-" in root: continue From patchwork Fri Jul 22 18:39: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: 10539 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 16DD2CCA489 for ; Fri, 22 Jul 2022 18:39:38 +0000 (UTC) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mx.groups.io with SMTP id smtpd.web11.11458.1658515168552939762 for ; Fri, 22 Jul 2022 11:39:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qTAf14tb; spf=pass (domain: gmail.com, ip: 209.85.218.48, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f48.google.com with SMTP id l23so10019619ejr.5 for ; Fri, 22 Jul 2022 11:39:28 -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=ApLkMAsvtvuW3lLfkcuZOiBTHFW5KtHbpzX5B9uYltc=; b=qTAf14tbuCDW0v+8ewi8ay0/IiWraNWErb0waWHZBQFitSh6BAzDWum5NCnLSBddQN 442kTVFZweWKJprKoOtzSqWBbnbafoo8Jk9HYkSCOAbwT7IY3s7y0S9G4tQcnz0iT/iU kRNtfrfGbMaOhIeblQqJ6BHo9tsOGxDnngjEwkSZtuCsVbAvsMoiJR7IvWYSzUJzA0w6 XpQngN8RvcL7EyWnKFx5wSnAFQiV5FLSmpYC7whqMb53+v8Nzfp+dCBklRxvpkiSFZDx V3ReJuJ3HbSaarZnCVnEY+1Gj4BRa/TS4p/vpqrSVDEdef0f6GtNIBC3Np69tm1xoNit dUKw== 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=ApLkMAsvtvuW3lLfkcuZOiBTHFW5KtHbpzX5B9uYltc=; b=nauhhhWYR21eWFqj/2Mk+xId5+COYFAUaXzRQ+Sr81H4/4YJ+AFUEfiAWYXIYNPQO3 Z3HYkylgSSWRg/8hqzET/zqoU8bA0aqGjACNCX43EGsET3EzYn8KGKp4ma/Cgdo6DIKv wtuveejTXdA2t3u4Q9AOjlfAYZurugcu4yE0aC20gthx0sCRr4LU/rNt/bnyV1PrnxU7 iJhtLx/lr5i0J5rGSdon1OAFW2wDsUQVx3BT17goVFqJXiqTe2DJl9EwMT29/ctun6f6 HRaBpD3HA3Yk/2l9Gy9wpKmVR/eNpsGL0JoPZn+0XohedbYCLJC8WcsVgjw11e9Mgsin g+Fg== X-Gm-Message-State: AJIora+YXZKrrIj3zgClaHf+K1YaA7ByTC/JyfbpgQx3Mh/uvt0Qp/3+ UgatTn2QpEqcWUNnl+N1zc8EaLRBTow= X-Google-Smtp-Source: AGRyM1vfSdhdcMRDAHlmVQkTJF1o13FQd0FX5X449TPWfWWD09Pz60J2FjOMo5FU/dXJ6j8IWnYzmg== X-Received: by 2002:a17:907:738a:b0:72e:8510:6bfd with SMTP id er10-20020a170907738a00b0072e85106bfdmr882000ejc.688.1658515166999; Fri, 22 Jul 2022 11:39:26 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id bt8-20020a0564020a4800b0043bba5ed21csm2931885edb.15.2022.07.22.11.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:39:26 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 2/6] meta-ide-support: adjust to provide (e)SDK experience directly in a yocto build Date: Fri, 22 Jul 2022 20:39:12 +0200 Message-Id: <20220722183916.360600-2-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220722183916.360600-1-alex@linutronix.de> References: <20220722183916.360600-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 ; Fri, 22 Jul 2022 18:39:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168419 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..7f349f673d 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_build[deptask] += "do_prepare_recipe_sysroot" From patchwork Fri Jul 22 18:39:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 10536 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 11677CCA48C for ; Fri, 22 Jul 2022 18:39:38 +0000 (UTC) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by mx.groups.io with SMTP id smtpd.web08.11359.1658515169257500002 for ; Fri, 22 Jul 2022 11:39:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ALwi7uB1; spf=pass (domain: gmail.com, ip: 209.85.218.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f53.google.com with SMTP id z23so9915296eju.8 for ; Fri, 22 Jul 2022 11:39:29 -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=ALwi7uB1+1t27DIn2FB+/ieOrp1GlPMmykcHvlo+qbdoc0U/A0xy/ipLC+J/pFb69q d4K4qr6DDAcveC1CCfYyCgu8mje8aQY/c+3K9qRv03NKS4MwYuJQzacAfU3hGuwjQZ5M T73Hro1uoOz4JFREkqYfuybDaTaRQ+thV+dhNaPYqb36Fc7WQU9HCo9KXnm9Hhqgmbyi Fe3p6+ro8Ter2Xg3TPggdPdZFiTLmOgRWmLbuDKJPEt5c5RKN3dbib2IRrQ2IgGcaiZL 8UE3eXhD10gG/ub4ZV5I9BY4R5e2Lwp2Bmi+BIvIIWrQFax+AN34N2wLhG+DyANrMFTA ldgg== 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=PjP4dkcsQFKXWAWLFXDuk4xXsR5hGYa3x8eZO/i/EnbrlKvMlJp1ToHqBfKqW4SpQa gWP8zFzScogTrVVPxTY+9GlzsjLxqrMgk2CmEBoD4ENVuC1ntETyH6Dlb8HC6rwmyxey XqkZA0miy9uiszY0EP6jy9OtGFDuJKwL3rrd0xd3QZXnKg5W9ISgainIOzcSnbJ1rz7Q OhRod5IQONFtEBiDL9FCS+L9DD5ZFTp574mqfMJ4+z8Yg5lUIPAcZihssNBQriNeP3Xj 838rdbBk5XhvEKPFv87Y+EOOuS5/ulfg7IjhXX0cXvcZZnQZtO6RP0RxE+cmnAQgttiC 10/A== X-Gm-Message-State: AJIora8OD+tBueeq7AQeWC5/Kw9XxBUMpM4K8moh+80dZNQ0iU7n494p VvrjZqFeBHtFiCiN4/iHZEh/jLFdviY= X-Google-Smtp-Source: AGRyM1vBXMaE8nyUPIYF/DqMRDtqgH4YcrmMFK5AEGT7o+A7r4je8rbzKQmhXL+4Iy6Q658F69wcfQ== X-Received: by 2002:a17:906:58d1:b0:72e:e049:cf00 with SMTP id e17-20020a17090658d100b0072ee049cf00mr889100ejs.361.1658515167746; Fri, 22 Jul 2022 11:39:27 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id bt8-20020a0564020a4800b0043bba5ed21csm2931885edb.15.2022.07.22.11.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:39:27 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/6] oeqa/sdk: add a test class for running SDK tests directly in a Yocto build Date: Fri, 22 Jul 2022 20:39:13 +0200 Message-Id: <20220722183916.360600-3-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220722183916.360600-1-alex@linutronix.de> References: <20220722183916.360600-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 ; Fri, 22 Jul 2022 18:39:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168420 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 Fri Jul 22 18:39:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 10537 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 109A0CCA473 for ; Fri, 22 Jul 2022 18:39:38 +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.web09.11472.1658515170135604690 for ; Fri, 22 Jul 2022 11:39:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OKPbnlp9; 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 sz17so9998125ejc.9 for ; Fri, 22 Jul 2022 11:39:29 -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=OKPbnlp9qvH/HCt42irYNh6KsWqHvzafIuwm1u9azR8kRahFoPUdAbLZFBXK9Tyd+0 mLU5u2igLEEEPgyzDVJw2wxzk4hao+Bhc7SsWB4mDf434gWleJF+yeBPAQ2y5DowdMi+ zH9Go8LZd5ed8vmPw5oY55tNpJ2C1oUkZweZtCdDnzSrXvTa41CDmGA8a5s5Sg2UDZzU KIUkrgMaVT/ikJS0hPu97H2AinG2lRTdhNWY8ZUkH/8R9zafMB89xhCgc17DRewFK0wo L8ac8zuG747Zlzica2tUq8erOH5CgaXjPFsIwGCWMSmrK76maLxKlTaaf/Jsy4HxDqA0 gZHg== 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=SIe0ubf0oHIoUic2pqf7YwGlRAfiovWGFphRQDEXOiwuMHE9lotZb/Tc79gCWRiyCg bmKRYQLma9HQg5v32gCTazFlnicDWQWR+rcghSh2Wza8GcLlrUfEJoaTGDr/hRBMVjrG PBkfjmKreuvP/iZvoiw+uhgdDCn6t/Qz1UZuNtmlJ3LIa62+0Phle+PURB5v3uDRfUFh xAWYC6DP9etUms6kmQl3OaT2o/hl4GoCsBPYm3UAUrQfrG5SZQfFYFSSJYEkUqugPvzl SGSx4mj5spw6ftEN9uf4dqUfK26XZDx1r/C7AeWmAXOtDe62xQvjisf+EDzhKgGdEkJ3 kgAg== X-Gm-Message-State: AJIora9fyc7sQ/lP7vr6SEew+hPYiPDOnB2N7hP/ykX0kg97gD4x1ztL YtODT1BCU0yZ9vtnIXaZsue5XhSXJAM= X-Google-Smtp-Source: AGRyM1uLiNUVgsk8WMrox0wUoJzrIr99q90vwAwiYxUFU1pCZ9Hafi2BAhbkRlRco/0tqqOowTGGWQ== X-Received: by 2002:a17:907:7745:b0:6f3:674a:339 with SMTP id kx5-20020a170907774500b006f3674a0339mr945745ejc.207.1658515168533; Fri, 22 Jul 2022 11:39:28 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id bt8-20020a0564020a4800b0043bba5ed21csm2931885edb.15.2022.07.22.11.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:39:28 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 4/6] oeqa/sdk: allow epoxy/galculator tests to run in esdk and direct yocto builds Date: Fri, 22 Jul 2022 20:39:14 +0200 Message-Id: <20220722183916.360600-4-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220722183916.360600-1-alex@linutronix.de> References: <20220722183916.360600-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 ; Fri, 22 Jul 2022 18:39:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168421 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 Fri Jul 22 18:39:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 10534 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 04848C433EF for ; Fri, 22 Jul 2022 18:39:38 +0000 (UTC) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by mx.groups.io with SMTP id smtpd.web08.11360.1658515170748928318 for ; Fri, 22 Jul 2022 11:39:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lXIW+XvE; spf=pass (domain: gmail.com, ip: 209.85.218.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f53.google.com with SMTP id ss3so9917890ejc.11 for ; Fri, 22 Jul 2022 11:39:30 -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=HV4O1xBjO7ifIR0IJ+F/PuCW3AjHrupNa+IcB9E8ZQ0=; b=lXIW+XvEHyreN/4sl0fIin+Ml9ooKr8rYqa0+w4YJCuUPJMwvLfS8f3ZInyjRaEjo1 gLmKv/lZY9j2zbIqzdzf1rP+szkaoFNlTpTz25ir7eaGe4DpBHpudAh+yYvEZm1Fp5eQ 5ModiQoXGSaaskk2hmdsPp5OlWoRzzaT5mSe/45azXKtTMBNpVaB4dtQaGc0ApoOg+nU wPkAkr0t55N2u43RC9WJky4LWEr1iFp00pfdcdwwxX9Db+yirQawCiP8zvBkvTe1DEdf XSokEq40WvNVLvQJash2vWvUj+SpE7FczxettFmvwnjFwuEOJ1oCK2fKImhQvcWVFjyg WBtw== 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=HV4O1xBjO7ifIR0IJ+F/PuCW3AjHrupNa+IcB9E8ZQ0=; b=t+oysEXI+KrcarOahkWqiMBIYVhUlI6FEpSbJZ03fXiYla30j8bb/XVA98QIhSYw4y 7DAo23TDX+sxZvTcpIomuqnTY+C41F7xvKdPWsydJInlH6XB1kNr1GPLOfWVVwXyLIsq pzE9sgzg7SAXIbY7yCK1Nzg+Ub1st3dDeMFgaT8oAIkderlI08Pm8ez68/5tAzLOEYOS cGjbH563N5uLu10A0qCTXKiNxwjaehf82y1WwCmnZnlxIfPOfg3T4iLpRdSsE8Lz3eYZ Mbt5upurL84HQEYqvKdh16Y03Xe2oYwK/X6joUeUEVQB3kFkNo3MBQ+adb77+Tro7Wle MO0A== X-Gm-Message-State: AJIora9FX4k4KNtRmCOgVQua1xuK5pje1BB74M501MUX8MGuEXSLOvgm vOY5onBdp1UmdNyEFgT0a5zXNEHjjG0= X-Google-Smtp-Source: AGRyM1uuvcND/J3zpn9MV025h8Am8QtW9+hGYlftKj85LOihSfrb+baL+pvFpafRhJPayiYOl5tSsw== X-Received: by 2002:a17:907:1c24:b0:72b:838f:cada with SMTP id nc36-20020a1709071c2400b0072b838fcadamr920102ejc.125.1658515169313; Fri, 22 Jul 2022 11:39:29 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id bt8-20020a0564020a4800b0043bba5ed21csm2931885edb.15.2022.07.22.11.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:39:28 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 5/6] meson: provide relocation script and native/cross wrappers also for meson-native Date: Fri, 22 Jul 2022 20:39:15 +0200 Message-Id: <20220722183916.360600-5-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220722183916.360600-1-alex@linutronix.de> References: <20220722183916.360600-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 ; Fri, 22 Jul 2022 18:39:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168422 When using meson-native directly from bitbake this has no effect and everything works as before; the use case is being able to build meson-driven projects from the 'direct SDK' environment. Build systems like cmake/autotools are entirely driven by environment variables, but meson needs configuration files, and so this replicates how SDKs set things up. In particular, with this change the libepoxy build test from the SDK test suite is able to pass. Signed-off-by: Alexander Kanavin --- .../meson/meson/meson-wrapper | 2 +- meta/recipes-devtools/meson/meson_0.62.2.bb | 34 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper index 8fafaad975..c62007f507 100755 --- a/meta/recipes-devtools/meson/meson/meson-wrapper +++ b/meta/recipes-devtools/meson/meson/meson-wrapper @@ -1,7 +1,7 @@ #!/bin/sh if [ -z "$OECORE_NATIVE_SYSROOT" ]; then - echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2 + exec "meson.real" "$@" fi if [ -z "$SSL_CERT_DIR" ]; then diff --git a/meta/recipes-devtools/meson/meson_0.62.2.bb b/meta/recipes-devtools/meson/meson_0.62.2.bb index acfc64fd4f..fd91da2d1f 100644 --- a/meta/recipes-devtools/meson/meson_0.62.2.bb +++ b/meta/recipes-devtools/meson/meson_0.62.2.bb @@ -75,7 +75,7 @@ def generate_native_link_template(d): return repr(val) -do_install:append:class-nativesdk() { +install_templates() { install -d ${D}${datadir}/meson cat >${D}${datadir}/meson/meson.native.template < X-Patchwork-Id: 10538 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 0935DCCA47C for ; Fri, 22 Jul 2022 18:39:38 +0000 (UTC) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mx.groups.io with SMTP id smtpd.web09.11473.1658515171520880319 for ; Fri, 22 Jul 2022 11:39:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aGdPZrUG; spf=pass (domain: gmail.com, ip: 209.85.218.49, mailfrom: alex.kanavin@gmail.com) Received: by mail-ej1-f49.google.com with SMTP id va17so10060291ejb.0 for ; Fri, 22 Jul 2022 11:39:31 -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=R8FBVLq9AFCEW9Z26eOWgsInvYCIr3eVsYaje6tixiw=; b=aGdPZrUGP6xFUfgIpHgB6Oo/xIGKMQvXjsKAvFJ7TwXTy5JWLAOCkL6eiHt9SKUR1s hK6j4Ka+vMx6XGXqJXxoFaidhm52ZyhIhxF6Viyf+PFYwDMgMoyhHcMZw7N0hoDJz/26 2GHY+W3XNTRSx72j5RHQ7zrMdUYMfxrak9aZHDQoDtvmWzBEr3RpZUwzfBochQhzKC/X 7HvZbK4phwIeDF0/5LJ6KaQ8GBAaQ7muE8UMwqvOgb7uuBui4AXdQiPJ0upx8sZI9sZ2 3Hl7SCh/G7bDNLiUzGE4O6Cm5mvL4+ZStvYCiVX7j5nlXQXhhzqFJ1ullZRPQnfwKecJ Yl+A== 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=R8FBVLq9AFCEW9Z26eOWgsInvYCIr3eVsYaje6tixiw=; b=bKr+cGxL5x1mti+KnKJCu7SN264Lergim3S8yOK3a+VU62jRMMrPrL9SqrHwMnPICb t7l/1peTBNObRX/4J76cGI86okmxxcvM2UqPV8SErqcpEaKZbmN4VseUFvQmbScEK3TU ISBv6RtzaA6lL2rDw4kazkU+gzn3SbG1EuMiEj8rn7OM6utR0zwexsCfABfQHvY+Vxhz ZCfhC7Hp2rtDV+FoNLvdeEW6mvqjD75eGeu92wlOSJMPk2WO8Bh0vPqgLsOf8hveoP08 DMyoScI6VTgejDmBy5jAdtgxiJaHt7CmzsObwK1vTGvQ634nAModIn2HY/YWThReGd79 cyVA== X-Gm-Message-State: AJIora/+5d21F6tx5FPqjl9Su1AxgDwmhwv9t1szWsWu2xykZPWsSNGg wurqoEWeOTe3CUjVbU+TOSXjNN2q2pY= X-Google-Smtp-Source: AGRyM1s2RrF0EDwn+v1T3oBAyaG0ZrMOtxTQbF60AtteceNS8fP26Le1ESfpLUM0xg2GfRqDZI0Uag== X-Received: by 2002:a17:906:9c82:b0:6df:baa2:9f75 with SMTP id fj2-20020a1709069c8200b006dfbaa29f75mr918448ejc.762.1658515170045; Fri, 22 Jul 2022 11:39:30 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id bt8-20020a0564020a4800b0043bba5ed21csm2931885edb.15.2022.07.22.11.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 11:39:29 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 6/6] selftest/meta_ide: add a test for running SDK tests directly in a yocto build Date: Fri, 22 Jul 2022 20:39:16 +0200 Message-Id: <20220722183916.360600-6-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220722183916.360600-1-alex@linutronix.de> References: <20220722183916.360600-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 ; Fri, 22 Jul 2022 18:39:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/168423 There's been a recent discussion about how we can make the Yocto SDK experience better [1]. One of the ideas was to eliminate the SDK as a separate artefact altogether and simply provide everything that the SDK and eSDKs do directly in a yocto build. This does not mean that people have to 'learn Yocto', but rather that the integrators should provide a well-functioning sstate cache infrastructure (same as with minimal eSDK, really), and a few wrapper scripts for setting up the build and the SDK environment that run layer setup and bitbake behind the scenes. [1] https://lists.openembedded.org/g/openembedded-architecture/topic/thoughts_on_the_esdk/90990557 So without further ado, here's how you get a 'SDK' without building one: 1. Set up all the needed layers and a yocto build directory. 2. Run: $ bitbake meta-ide-support $ bitbake -c populate_sysroot gtk+3 (or any other target or native item that the application developer would need) $ bitbake populate-sysroots 3. Set up the SDK environment: . tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux (adjust accordingly) Et voila! The Unix environment is now set up to use the cross-toolchain from Yocto, exactly as in the SDK. And devtool/bitbake are available to extend it, exactly as in the eSDK. Theare are numerous benefits here: no need to produce, test, distribute and maintain separate SDK artifacts. No two separate environments for the yocto build and the SDK. Less code paths where things can go wrong. Less awkward, gigantic tarballs. Less SDK update headaches: 'updating the SDK' simply means updating the yocto layers with git fetch or layer management tooling. Built-in SDK extensibility: just run bitbake again to add more things to the sysroot, or add layers if even more things are required. How is this tested? Exactly same as the regular SDK: $ bitbake -c testsdk meta-ide-support This runs the same toolchain tests from meta/lib/oeqa/sdk/cases as the regular sdk testing does. 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')