From: Richard Purdie Date: Fri, 31 Jul 2015 10:23:22 +0000 (+0100) Subject: testimage: testsdk fixes/improvements X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~29550 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44c8b1bd58397db85e6f7bb9a57f0d57d2c69ad5;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git testimage: testsdk fixes/improvements 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 2b655b49fa7..140babed74f 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,42 @@ 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 <