oeqa/selftest: Add test for Yocto source mirror functionality/completeness

We've had a number of occasions where the Yocto Project source mirrors have not
been complete or functioning correctly. This adds a test so that if this happens
we find out out it sooner.

It also only works over http meaning we should be able to test that anyone behind
an http only proxy (no git protocol) also has functional fetches for OE-Core and
layers built by the core of the project.

(From OE-Core rev: 9a25b2eb9cc13dd77a774dad83067ea5f9bf9716)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2018-11-05 15:52:09 +00:00
parent e1f8c4dac8
commit 36df73a523

View File

@@ -178,3 +178,26 @@ class ToolchainOptions(OESelftestTestCase):
bitbake('gcc-runtime libgfortran')
class SourceMirroring(OESelftestTestCase):
# Can we download everything from the Yocto Sources Mirror over http only
def test_yocto_source_mirror(self):
self.write_config("""
BB_ALLOWED_NETWORKS = "downloads.yoctoproject.org"
MIRRORS = ""
DL_DIR = "${TMPDIR}/test_downloads"
PREMIRRORS = "\\
bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n \\
https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \\n"
""")
bitbake("world --runall fetch")