]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta/classes/testexport: Remove __pycache__ from exported tests
authorAníbal Limón <anibal.limon@linaro.org>
Wed, 17 Oct 2018 23:00:44 +0000 (18:00 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Oct 2018 15:47:59 +0000 (16:47 +0100)
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.

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/testexport.bbclass

index d070f07afad19b4851abd5c1263eab7fc7bb70d9..59cbaefbf9fcec01f411b9517b84ea770fd8ad4b 100644 (file)
@@ -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"))