summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2015-09-10 18:15:27 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-18 09:05:34 +0100
commit2bb600a579cd8fec3887593b3a26e26a4b06b13b (patch)
tree6c9596a39f8785bddc3ae6088c9d72feb5d424a8 /bitbake/lib/bb/tests/fetch.py
parent4c3d4eceb1811c4c17fb6649be86d8038a8daf4d (diff)
downloadpoky-2bb600a579cd8fec3887593b3a26e26a4b06b13b.tar.gz
bitbake: tests/fetch.py: Fix recursion failure in url mapping
Instead of reproducessing the same line over and over and over, we remove the current line from the mirror list. This permits us to re-evaluate the list while excluding all matches that have previousily occured. Without this fix, adding this test results in a failure: RuntimeError: maximum recursion depth exceeded in cmp (Bitbake rev: 24a8e9a5b0ba145ae589178d74365c986ebca325) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-rw-r--r--bitbake/lib/bb/tests/fetch.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 84862247e0..94173c14a8 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -405,13 +405,16 @@ class MirrorUriTest(FetcherTest):
405 'http://otherdownloads.yoctoproject.org/downloads/bitbake-1.0.tar.gz', 405 'http://otherdownloads.yoctoproject.org/downloads/bitbake-1.0.tar.gz',
406 'http://downloads2.yoctoproject.org/downloads/bitbake-1.0.tar.gz']) 406 'http://downloads2.yoctoproject.org/downloads/bitbake-1.0.tar.gz'])
407 407
408 recmirrorvar = "https://.*/[^/]* http://AAAA/A/A/A/ \n" 408 recmirrorvar = "https://.*/[^/]* http://AAAA/A/A/A/ \n" \
409 "https://.*/[^/]* https://BBBB/B/B/B/ \n"
409 410
410 def test_recursive(self): 411 def test_recursive(self):
411 fetcher = bb.fetch.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d) 412 fetcher = bb.fetch.FetchData("https://downloads.yoctoproject.org/releases/bitbake/bitbake-1.0.tar.gz", self.d)
412 mirrors = bb.fetch2.mirror_from_string(self.recmirrorvar) 413 mirrors = bb.fetch2.mirror_from_string(self.recmirrorvar)
413 uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d) 414 uris, uds = bb.fetch2.build_mirroruris(fetcher, mirrors, self.d)
414 self.assertEqual(uris, ['http://AAAA/A/A/A/bitbake/bitbake-1.0.tar.gz']) 415 self.assertEqual(uris, ['http://AAAA/A/A/A/bitbake/bitbake-1.0.tar.gz',
416 'https://BBBB/B/B/B/bitbake/bitbake-1.0.tar.gz',
417 'http://AAAA/A/A/A/B/B/bitbake/bitbake-1.0.tar.gz'])
415 418
416class FetcherLocalTest(FetcherTest): 419class FetcherLocalTest(FetcherTest):
417 def setUp(self): 420 def setUp(self):