All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Cc: paul.eggleton@linux.intel.com, benjamin.esquivel@intel.com
Subject: [PATCH 06/20] classes/testsdk: Add testsdkext task only install.
Date: Tue,  2 Feb 2016 09:14:09 -0600	[thread overview]
Message-ID: <a7ba70970f40316e3f60118a5738a261e021156e.1454424743.git.anibal.limon@linux.intel.com> (raw)
In-Reply-To: <cover.1454424743.git.anibal.limon@linux.intel.com>
In-Reply-To: <cover.1454424743.git.anibal.limon@linux.intel.com>

Add task for test extensible sdk for now only install the SDK.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 meta/classes/testsdk.bbclass | 45 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index d81c456..c169742 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -98,3 +98,48 @@ python do_testsdk() {
 addtask testsdk
 do_testsdk[nostamp] = "1"
 do_testsdk[lockfiles] += "${TESTSDKLOCK}"
+
+TEST_LOG_SDKEXT_DIR ?= "${WORKDIR}/testsdkext"
+TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock"
+
+def testsdkext_main(d):
+    import unittest
+    import os
+    import glob
+    import oeqa.sdkext
+    import time
+    import subprocess
+    from oeqa.oetest import loadTests, runTests, get_test_suites, get_tests_list
+
+    pn = d.getVar("PN", True)
+    bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True))
+
+    # tests in TEST_SUITES become required tests
+    # they won't be skipped even if they aren't suitable.
+    # testslist is what we'll actually pass to the unittest loader
+    testslist = get_tests_list(get_test_suites(d, "sdkext"),
+                    d.getVar("BBPATH", True).split(':'), "sdkext")
+    testsrequired = [t for t in (d.getVar("TEST_SUITES_SDKEXT", True) or \
+                    "auto").split() if t != "auto"]
+
+    tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
+    if not os.path.exists(tcname):
+        bb.fatal("The toolchain ext is not built. Build it before running the" \
+                 " tests: 'bitbake <image> -c populate_sdk_ext' .")
+
+    testdir = d.expand("${WORKDIR}/testsdkext/")
+    bb.utils.remove(testdir, True)
+    bb.utils.mkdirhier(testdir)
+    try:
+        subprocess.check_output("%s -y -d %s" % (tcname, testdir), shell=True)
+    except subprocess.CalledProcessError as e:
+        bb.fatal("Couldn't install the SDK EXT:\n%s" % e.output)
+
+testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
+
+python do_testsdkext() {
+    testsdkext_main(d)
+}
+addtask testsdkext
+do_testsdkext[nostamp] = "1"
+do_testsdkext[lockfiles] += "${TESTSDKEXTLOCK}"
-- 
2.1.4



  parent reply	other threads:[~2016-02-02 15:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 15:14 [PATCH 00/20] Add Extensible SDK test suite Aníbal Limón
2016-02-02 15:14 ` [PATCH 01/20] testimage: Modularize helper functions for get test lists Aníbal Limón
2016-02-02 15:14 ` [PATCH 02/20] classes/testsdk: Add new class testsdk Aníbal Limón
2016-02-02 15:14 ` [PATCH 03/20] classes/testimage: Add defeault inherit for testsdk Aníbal Limón
2016-02-02 15:14 ` [PATCH 04/20] populate_sdk_ext: Set TOOLCHAINEXT_OUTPUTNAME Aníbal Limón
2016-02-02 15:14 ` [PATCH 05/20] get_test_suites: Add sdkext type for load test suites Aníbal Limón
2016-02-02 15:14 ` Aníbal Limón [this message]
2016-02-02 15:14 ` [PATCH 07/20] bb/fetch2: Move export_proxies function from wget to utils Aníbal Limón
2016-02-02 15:15   ` Aníbal Limón
2016-02-02 15:14 ` [PATCH 08/20] classes/testsdk: Add call to export_proxies on testsdkext Aníbal Limón
2016-02-02 15:14 ` [PATCH 09/20] toolchain-shar-extract.sh: Add proxy variable to new env Aníbal Limón
2016-02-02 15:14 ` [PATCH 10/20] testimage/testsdk: Modularize TestContext Aníbal Limón
2016-02-02 15:14 ` [PATCH 11/20] testimage/testsdk: Move get test suites routine inside TestContext Aníbal Limón
2016-02-02 15:14 ` [PATCH 12/20] oetest.py/TestContext: Move loadTests and runTests inside it Aníbal Limón
2016-02-02 15:14 ` [PATCH 13/20] oeqa/oetest.py: Fix missing oeqa.runtime import Aníbal Limón
2016-02-02 21:25   ` Paul Eggleton
2016-02-02 21:31     ` Aníbal Limón
2016-02-02 21:32       ` Paul Eggleton
2016-02-02 15:14 ` [PATCH 14/20] classes/testsdk: Add function run_test_context Aníbal Limón
2016-02-02 15:14 ` [PATCH 15/20] classes/populate_sdk_ext: Add OE_SDK_EXT_SILENT env variable Aníbal Limón
2016-02-02 21:19   ` Paul Eggleton
2016-02-02 21:23     ` Aníbal Limón
2016-02-02 21:25       ` Paul Eggleton
2016-02-02 21:30         ` Aníbal Limón
2016-02-02 21:31           ` Paul Eggleton
2016-02-02 21:38             ` Aníbal Limón
2016-02-02 21:40               ` Paul Eggleton
2016-02-02 21:47                 ` Aníbal Limón
2016-02-02 21:49                   ` Paul Eggleton
2016-02-02 15:14 ` [PATCH 16/20] classes/testsdk: Add compatibility SDK testsuite to eSDK Aníbal Limón
2016-02-02 15:14 ` [PATCH 17/20] testsdkext: Add skeleton for support Extensible SDK tests Aníbal Limón
2016-02-02 15:14 ` [PATCH 18/20] classes/populate_sdk_ext: Add SDK_EXT_TARGET_MANIFEST and SDK_EXT_HOST_MANIFEST Aníbal Limón
2016-02-02 21:52   ` Paul Eggleton
2016-02-02 22:05     ` Aníbal Limón
2016-02-02 22:06       ` Paul Eggleton
2016-02-02 22:13         ` Aníbal Limón
2016-02-02 22:15           ` Paul Eggleton
2016-02-02 15:14 ` [PATCH 19/20] oeqa/sdkext: Add devtool basic tests for eSDK Aníbal Limón
2016-02-02 22:03   ` Paul Eggleton
2016-02-02 22:14     ` Aníbal Limón
2016-02-02 15:14 ` [PATCH 20/20] classes/testsdk: Add help information on how to run tests Aníbal Limón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7ba70970f40316e3f60118a5738a261e021156e.1454424743.git.anibal.limon@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=benjamin.esquivel@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.