]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
testexport.bbclass: use image suffix in testexport tar ball name agodard/master-next
authorMikko Rapeli <mikko.rapeli@linaro.org>
Wed, 2 Jul 2025 07:25:15 +0000 (10:25 +0300)
committerAntonin Godard <antonin.godard@bootlin.com>
Mon, 7 Jul 2025 07:29:15 +0000 (09:29 +0200)
testexport.tar.gz is image specific. Thus add same image name
suffix to the tar ball name. For example genericarm64 machine
core-image-minimal image tar ball changes name from
testexport.tar.gz to testexport-core-image-minimal-genericarm64.tar.gz

This way testexport from multiple images can exists in the same
directory.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
meta/classes-recipe/testexport.bbclass

index 843d777e3bb9f842c16d77e8f792e746e33b92b3..3005fc0dfa52a2907e4f3d13cb073c3e5712de41 100644 (file)
@@ -136,8 +136,12 @@ def copy_needed_files(d, tc):
             if dir == '__pycache__':
                 shutil.rmtree(os.path.join(subdir, dir))
 
+    image_basename = d.getVar('IMAGE_BASENAME')
+    image_machine_suffix = d.getVar('IMAGE_MACHINE_SUFFIX')
+
     # Create tar file for common parts of testexport
-    testexport_create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR"))
+    testexport_create_tarball(d, "testexport-%s%s.tar.gz" %
+        (image_basename, image_machine_suffix), d.getVar("TEST_EXPORT_DIR"))
 
     # Copy packages needed for runtime testing
     test_paths = get_runtime_paths(d)
@@ -149,7 +153,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
-        testexport_create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE"), export_pkg_dir)
+        testexport_create_tarball(d, "testexport_packages%s.tar.gz" % image_machine_suffix, export_pkg_dir)
 
     # Copy SDK
     if d.getVar("TEST_EXPORT_SDK_ENABLED") == "1":