From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 941F47647D for ; Fri, 31 Jul 2015 10:23:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t6VANbiA019792 for ; Fri, 31 Jul 2015 11:23:37 +0100 Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XESet3AHwWYi for ; Fri, 31 Jul 2015 11:23:37 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t6VANM0D019777 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 31 Jul 2015 11:23:33 +0100 Message-ID: <1438338202.22462.5.camel@linuxfoundation.org> From: Richard Purdie To: openembedded-core Date: Fri, 31 Jul 2015 11:23:22 +0100 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Subject: [PATCH] testimage: testsdk fixes/improvements X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2015 10:23:39 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit The "bitbake meta-toolchain" comment is dated and incorrect, fix to point at -c populate_sdk. If a toolchain contains multiple environment files, iterate them and run the sdk test suite on each on in turn rather than giving a fatal error and giving up. Also improve the debug output so that rather than PN, it also show the toolchain tarball under test, and the environment file name its using. Also enable the accidentally disabled cleanup code. Signed-off-by: Richard Purdie diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 37acb0c..067f771 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -296,19 +296,9 @@ def testsdk_main(d): testslist = get_tests_list(d, "sdk") testsrequired = [t for t in (d.getVar("TEST_SUITES_SDK", True) or "auto").split() if t != "auto"] - sdktestdir = d.expand("${WORKDIR}/testimage-sdk/") - bb.utils.remove(sdktestdir, True) - bb.utils.mkdirhier(sdktestdir) - tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh") if not os.path.exists(tcname): - bb.fatal("The toolchain is not built. Build it before running the tests: 'bitbake meta-toolchain' .") - subprocess.call("cd %s; %s < 1: - bb.fatal("Error, multiple targets within the SDK found and we don't know which to test? %s" % str(targets)) - sdkenv = sdktestdir + "/tc/environment-setup-" + os.path.basename(targets[0]) + bb.fatal("The toolchain is not built. Build it before running the tests: 'bitbake -c populate_sdk' .") class TestContext(object): def __init__(self): @@ -333,33 +323,41 @@ def testsdk_main(d): except IOError as e: bb.fatal("No host package manifest file found. Did you build the sdk image?\n%s" % e) - # test context - tc = TestContext() + sdktestdir = d.expand("${WORKDIR}/testimage-sdk/") + bb.utils.remove(sdktestdir, True) + bb.utils.mkdirhier(sdktestdir) + subprocess.call("cd %s; %s <