]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/targetbuild: Use DL_DIR for downloads if present
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Apr 2015 10:49:18 +0000 (11:49 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 29 Apr 2015 09:39:40 +0000 (10:39 +0100)
This isn't a test of wget so if the files we need are present in DL_DIR,
use them from there and save a bit of speed/bandwidth and skip the wget.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/targetbuild.py

index eeb08ba7164bee2295fd5dc0a42770cb3943ec0c..d499bb1e1e7d31700d2678d2c15c270ffe9a8995 100644 (file)
@@ -26,6 +26,11 @@ class BuildProject():
     # Download self.archive to self.localarchive
     def _download_archive(self):
 
+        dl_dir = self.d.getVar("DL_DIR", True)
+        if dl_dir and os.path.exists(os.path.join(dl_dir, self.archive)):
+            bb.utils.copyfile(os.path.join(dl_dir, self.archive), self.localarchive)
+            return
+
         exportvars = ['HTTP_PROXY', 'http_proxy',
                       'HTTPS_PROXY', 'https_proxy',
                       'FTP_PROXY', 'ftp_proxy',