From 07fab73745eed8ce9dd0790d77f58ac98be49cec Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Wed, 17 Oct 2018 18:00:44 -0500 Subject: meta/classes/testexport: Remove __pycache__ from exported tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The __pycache__ is created based on python3 version in the build machine and isn't a garantee to be useful on the system that runs exported tests. (From OE-Core rev: 405e822e9da4b53ec9ee8019364fdcb13ccc2587) Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- meta/classes/testexport.bbclass | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'meta/classes/testexport.bbclass') diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass index d070f07afa..59cbaefbf9 100644 --- a/meta/classes/testexport.bbclass +++ b/meta/classes/testexport.bbclass @@ -131,6 +131,11 @@ 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")) -- cgit v1.2.3-54-g00ecf