summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-06-12 18:57:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-06-13 09:11:17 +0100
commit4d50069d78ca876b2983004df8e92bda24fa779e (patch)
tree56bfc27528496aa5e92a343e151aaad9fd15f301 /meta/lib
parent38feae1adb0a16c4689abe2b579256dbeb99f553 (diff)
downloadpoky-4d50069d78ca876b2983004df8e92bda24fa779e.tar.gz
oeqa/sdk/case: Ensure DL_DIR is populated with artefacts if used
Where we're using DL_DIR in sdk archive to try and cache testing artefacts, copy into the cache so that it gets populated and this doesn't have to be done manually. Currently we're making a lot of repeat requests to github as this wasn't being populated. (From OE-Core rev: a3284958a2cc6c90a5fac26976bddc23f821c972) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/sdk/case.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/lib/oeqa/sdk/case.py b/meta/lib/oeqa/sdk/case.py
index c45882689c..46a3789f57 100644
--- a/meta/lib/oeqa/sdk/case.py
+++ b/meta/lib/oeqa/sdk/case.py
@@ -6,6 +6,7 @@
6 6
7import os 7import os
8import subprocess 8import subprocess
9import shutil
9 10
10from oeqa.core.case import OETestCase 11from oeqa.core.case import OETestCase
11 12
@@ -21,12 +22,14 @@ class OESDKTestCase(OETestCase):
21 archive = os.path.basename(urlparse(url).path) 22 archive = os.path.basename(urlparse(url).path)
22 23
23 if dl_dir: 24 if dl_dir:
24 tarball = os.path.join(dl_dir, archive) 25 archive_tarball = os.path.join(dl_dir, archive)
25 if os.path.exists(tarball): 26 if os.path.exists(archive_tarball):
26 return tarball 27 return archive_tarball
27 28
28 tarball = os.path.join(workdir, archive) 29 tarball = os.path.join(workdir, archive)
29 subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT) 30 subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT)
31 if dl_dir and not os.path.exists(archive_tarball):
32 shutil.copyfile(tarball, archive_tarball)
30 return tarball 33 return tarball
31 34
32 def check_elf(self, path, target_os=None, target_arch=None): 35 def check_elf(self, path, target_os=None, target_arch=None):