aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/testexport.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/testexport.bbclass')
-rw-r--r--meta/classes/testexport.bbclass19
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index d070f07afad..85b3009ef7c 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -58,8 +58,8 @@ def testexport_main(d):
logger = logging.getLogger("BitBake")
target = OERuntimeTestContextExecutor.getTarget(
- d.getVar("TEST_TARGET"), None, d.getVar("TEST_TARGET_IP"),
- d.getVar("TEST_SERVER_IP"))
+ d.getVar("TEST_TARGET"), d.getVar('BBLAYERS').split(), None,
+ d.getVar("TEST_TARGET_IP"), d.getVar("TEST_SERVER_IP"))
host_dumper = OERuntimeTestContextExecutor.getHostDumper(
d.getVar("testimage_dump_host"), d.getVar("TESTIMAGE_DUMP_DIR"))
@@ -108,6 +108,21 @@ def copy_needed_files(d, tc):
else:
shutil.copy2(src, dst)
+ # Get all target files.
+ t_path = os.path.join('lib', 'oeqa', 'core', 'target')
+ targets_to_copy = [os.path.join(root, filename)
+ for path in d.getVar('BBLAYERS').split()
+ for root, _, files in os.walk(os.path.join(path, t_path))
+ for filename in files
+ if filename.endswith('.py') ]
+
+ # Copy all targets.
+ export_target_path = os.path.join(export_path, t_path)
+ oe.path.remove(export_target_path)
+ bb.utils.mkdirhier(export_target_path)
+ for f in targets_to_copy:
+ shutil.copy2(f, export_target_path)
+
# Remove cases and just copy the ones specified
cases_path = os.path.join(export_path, 'lib', 'oeqa', 'runtime', 'cases')
oe.path.remove(cases_path)