diff options
Diffstat (limited to 'meta/classes/testexport.bbclass')
-rw-r--r-- | meta/classes/testexport.bbclass | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass index d070f07afa..1b0fb44a4a 100644 --- a/meta/classes/testexport.bbclass +++ b/meta/classes/testexport.bbclass @@ -131,8 +131,13 @@ def copy_needed_files(d, tc): shutil.copy2(image_manifest, os.path.join(test_data_path, 'manifest')) shutil.copy2(tdname, os.path.join(test_data_path, 'testdata.json')) + for subdir, dirs, files in os.walk(export_path): + for dir in dirs: + if dir == '__pycache__': + shutil.rmtree(os.path.join(subdir, dir)) + # Create tar file for common parts of testexport - create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR")) + testexport_create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR")) # Copy packages needed for runtime testing package_extraction(d, tc.suites) @@ -141,7 +146,7 @@ def copy_needed_files(d, tc): export_pkg_dir = os.path.join(d.getVar("TEST_EXPORT_DIR"), "packages") oe.path.copytree(test_pkg_dir, export_pkg_dir) # Create tar file for packages needed by the DUT - create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE"), export_pkg_dir) + testexport_create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE"), export_pkg_dir) # Copy SDK if d.getVar("TEST_EXPORT_SDK_ENABLED") == "1": @@ -154,11 +159,11 @@ def copy_needed_files(d, tc): shutil.copy2(tarball_path, export_sdk_dir) # Create tar file for the sdk - create_tarball(d, "testexport_sdk_%s.tar.gz" % d.getVar("SDK_ARCH"), export_sdk_dir) + testexport_create_tarball(d, "testexport_sdk_%s.tar.gz" % d.getVar("SDK_ARCH"), export_sdk_dir) bb.plain("Exported tests to: %s" % export_path) -def create_tarball(d, tar_name, src_dir): +def testexport_create_tarball(d, tar_name, src_dir): import tarfile |