summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2021-10-17 20:45:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-01 11:12:16 +0000
commite36765222d9e79f41253f55a7173dc972ff3411b (patch)
tree3f79d985cbeaf2f0c1925cf8326a694f81c5fa9b /bitbake
parent16b2acfff21fcc9bfb380fe5b3083fcb704d2638 (diff)
downloadpoky-e36765222d9e79f41253f55a7173dc972ff3411b.tar.gz
bitbake: tests/fetch.py: fix premirror test cases
When downloadfilename is specified, it is used to fetch from premirror. So fix the test cases accordingly. (Bitbake rev: 3b4d2e3b5024324058360a2a28f33c34114218d0) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tests/fetch.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 8ad1c85990..d06580db88 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -875,17 +875,17 @@ class FetcherNetworkTest(FetcherTest):
875 @skipIfNoNetwork() 875 @skipIfNoNetwork()
876 def test_fetch_premirror_specify_downloadfilename_regex_uri(self): 876 def test_fetch_premirror_specify_downloadfilename_regex_uri(self):
877 self.d.setVar("PREMIRRORS", "http://.*/.* https://downloads.yoctoproject.org/releases/bitbake/") 877 self.d.setVar("PREMIRRORS", "http://.*/.* https://downloads.yoctoproject.org/releases/bitbake/")
878 fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz;downloadfilename=bitbake-v1.0.0.tar.gz"], self.d) 878 fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/1.0.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d)
879 fetcher.download() 879 fetcher.download()
880 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-v1.0.0.tar.gz"), 57749) 880 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
881 881
882 @skipIfNoNetwork() 882 @skipIfNoNetwork()
883 # BZ13039 883 # BZ13039
884 def test_fetch_premirror_specify_downloadfilename_specific_uri(self): 884 def test_fetch_premirror_specify_downloadfilename_specific_uri(self):
885 self.d.setVar("PREMIRRORS", "http://invalid.yoctoproject.org/releases/bitbake https://downloads.yoctoproject.org/releases/bitbake") 885 self.d.setVar("PREMIRRORS", "http://invalid.yoctoproject.org/releases/bitbake https://downloads.yoctoproject.org/releases/bitbake")
886 fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz;downloadfilename=bitbake-v1.0.0.tar.gz"], self.d) 886 fetcher = bb.fetch.Fetch(["http://invalid.yoctoproject.org/releases/bitbake/1.0.tar.gz;downloadfilename=bitbake-1.0.tar.gz"], self.d)
887 fetcher.download() 887 fetcher.download()
888 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-v1.0.0.tar.gz"), 57749) 888 self.assertEqual(os.path.getsize(self.dldir + "/bitbake-1.0.tar.gz"), 57749)
889 889
890 @skipIfNoNetwork() 890 @skipIfNoNetwork()
891 def gitfetcher(self, url1, url2): 891 def gitfetcher(self, url1, url2):