mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import shutil
|
||||||
|
|
||||||
from oeqa.core.case import OETestCase
|
from oeqa.core.case import OETestCase
|
||||||
|
|
||||||
@@ -21,12 +22,14 @@ class OESDKTestCase(OETestCase):
|
|||||||
archive = os.path.basename(urlparse(url).path)
|
archive = os.path.basename(urlparse(url).path)
|
||||||
|
|
||||||
if dl_dir:
|
if dl_dir:
|
||||||
tarball = os.path.join(dl_dir, archive)
|
archive_tarball = os.path.join(dl_dir, archive)
|
||||||
if os.path.exists(tarball):
|
if os.path.exists(archive_tarball):
|
||||||
return tarball
|
return archive_tarball
|
||||||
|
|
||||||
tarball = os.path.join(workdir, archive)
|
tarball = os.path.join(workdir, archive)
|
||||||
subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT)
|
subprocess.check_output(["wget", "-O", tarball, url], stderr=subprocess.STDOUT)
|
||||||
|
if dl_dir and not os.path.exists(archive_tarball):
|
||||||
|
shutil.copyfile(tarball, archive_tarball)
|
||||||
return tarball
|
return tarball
|
||||||
|
|
||||||
def check_elf(self, path, target_os=None, target_arch=None):
|
def check_elf(self, path, target_os=None, target_arch=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user