* [PATCH] testexport: Add support for testcase utils
@ 2018-09-18 9:20 Erik Botö
2018-09-18 9:35 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Erik Botö @ 2018-09-18 9:20 UTC (permalink / raw)
To: openembedded-core
Add the possibility to ship a lib/oeqa/runtime/cases/utils directory
that will be included in the generated testexport tarball.
This makes it easier to split common functionality from test suites
into modules that can be imported from multiple test suites.
---
meta/classes/testexport.bbclass | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index d070f07afa..e67e5842d6 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -74,6 +74,21 @@ def testexport_main(d):
copy_needed_files(d, tc)
+def get_runtime_cases_utils_paths(d):
+ """
+ Returns a list of paths where testcase utils must reside. Utils can be e.g.
+ common functionality used by multiple test cases.
+
+ Testcase utils are expected in <LAYER_DIR>/lib/oeqa/runtime/cases/utils/
+ """
+ paths = []
+
+ for layer in d.getVar('BBLAYERS').split():
+ path = os.path.join(layer, 'lib/oeqa/runtime/cases/utils')
+ if os.path.isdir(path):
+ paths.append(path)
+ return paths
+
def copy_needed_files(d, tc):
import shutil
import oe.path
@@ -108,6 +123,8 @@ def copy_needed_files(d, tc):
else:
shutil.copy2(src, dst)
+
+
# Remove cases and just copy the ones specified
cases_path = os.path.join(export_path, 'lib', 'oeqa', 'runtime', 'cases')
oe.path.remove(cases_path)
@@ -121,6 +138,15 @@ def copy_needed_files(d, tc):
if json_file:
shutil.copy2(json_file, cases_path)
+
+ # Copy cases/utils provided by layers
+ utils_dest_path = os.path.join(export_path, 'lib', 'oeqa', 'runtime', 'cases', 'utils')
+ utils_source_paths = get_runtime_cases_utils_paths(d)
+
+ for f in utils_source_paths:
+ if os.path.isdir(f):
+ oe.path.copytree(f, utils_dest_path)
+
# Copy test data
image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
d.getVar('IMAGE_LINK_NAME')))
--
2.19.0.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ patchtest: failure for testexport: Add support for testcase utils
2018-09-18 9:20 [PATCH] testexport: Add support for testcase utils Erik Botö
@ 2018-09-18 9:35 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-09-18 9:35 UTC (permalink / raw)
To: Erik Botö; +Cc: openembedded-core
== Series Details ==
Series: testexport: Add support for testcase utils
Revision: 1
URL : https://patchwork.openembedded.org/series/14113/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Patch testexport: Add support for testcase utils
Issue Patch is missing Signed-off-by [test_signed_off_by_presence]
Suggested fix Sign off the patch (either manually or with "git commit --amend -s")
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-18 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-18 9:20 [PATCH] testexport: Add support for testcase utils Erik Botö
2018-09-18 9:35 ` ✗ patchtest: failure for " Patchwork
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.