summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-20 17:59:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-21 12:16:28 +0000
commit0b674b09c181a015685c5b6d9cdf6f0a5b45fa1b (patch)
tree1eb2a9d4947e06a96469d3df7da59a72516e3c02 /meta/lib/oeqa
parent403c16c89d9145a96348690a5911babfdc2b4698 (diff)
downloadpoky-0b674b09c181a015685c5b6d9cdf6f0a5b45fa1b.tar.gz
qemu/testimage: Ensure GNU tar is in test images
We've seen cases where a ptest (strace) has a 43GB sparse file in the test directory. busybox tar doesn't work well with this. The resulting 1.4GB archive takes hours to extract too. Ensure tar is added to our full images and use the sparse option to collect files for debugging. This stops crazy build hangs. Since tar is GPLv3, we have to exclude it from that test code. We don't boot any of those images so the debug collection code is safe there, at least for now. (From OE-Core rev: fefeb919696b6ac76f0997acfb0f612203ef7f1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/cases/incompatible_lic.py3
-rw-r--r--meta/lib/oeqa/utils/postactions.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/incompatible_lic.py b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
index be5484bca4..93884f5731 100644
--- a/meta/lib/oeqa/selftest/cases/incompatible_lic.py
+++ b/meta/lib/oeqa/selftest/cases/incompatible_lic.py
@@ -102,6 +102,7 @@ class IncompatibleLicensePerImageTests(OESelftestTestCase):
102 return """ 102 return """
103IMAGE_INSTALL:append = " bash" 103IMAGE_INSTALL:append = " bash"
104INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*" 104INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*"
105MACHINE_ESSENTIAL_EXTRA_RDEPENDS:remove = "tar"
105""" 106"""
106 107
107 def test_bash_default(self): 108 def test_bash_default(self):
@@ -136,6 +137,8 @@ class NoGPL3InImagesTests(OESelftestTestCase):
136 def test_core_image_minimal(self): 137 def test_core_image_minimal(self):
137 self.write_config(""" 138 self.write_config("""
138INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*" 139INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0* LGPL-3.0*"
140
141require conf/distro/include/no-gplv3.inc
139""") 142""")
140 bitbake('core-image-minimal') 143 bitbake('core-image-minimal')
141 144
diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py
index 8f787838b9..c69481db6c 100644
--- a/meta/lib/oeqa/utils/postactions.py
+++ b/meta/lib/oeqa/utils/postactions.py
@@ -64,7 +64,8 @@ def list_and_fetch_failed_tests_artifacts(d, tc, artifacts_list, outputdir):
64 bb.warn("Could not load artifacts list, skip artifacts retrieval") 64 bb.warn("Could not load artifacts list, skip artifacts retrieval")
65 return 65 return
66 try: 66 try:
67 cmd = "tar zcf - " + " ".join(artifacts_list) 67 # We need gnu tar for sparse files, not busybox
68 cmd = "tar --sparse -zcf - " + " ".join(artifacts_list)
68 (status, output) = tc.target.run(cmd, raw = True) 69 (status, output) = tc.target.run(cmd, raw = True)
69 if status != 0 or not output: 70 if status != 0 or not output:
70 raise Exception("Error while fetching compressed artifacts") 71 raise Exception("Error while fetching compressed artifacts")