support/testing/run-tests: add a mode to only download emulator builtin binaries

Currently, emulator builtin binaries are downloaded after the rootfs
build by each tests running the emulator (Qemu) on armv5 or armv7.

Due to download quota on the server hosting theses binaries [1]
some GitLab jobs are failing due to "Connection reset by peer" [2]:

  ConnectionResetError: [Errno 104] Connection reset by peer

In a follow up commit, we'll add the possibility to download only once
all emulator builtin binaries to pass them as build artifacts.

As such, we will need to make sure that run-tests only download theses
binaries, and that it does not run the testsuite.

Add such a mode, with a new option, --prepare-only.

[1] http://autobuild.buildroot.net/artefacts
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/4409032417

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Romain Naour 2023-07-17 23:33:57 +02:00 committed by Thomas Petazzoni
parent ed20a4eccd
commit 873306199e

View File

@ -8,6 +8,8 @@ import nose2
from infra.basetest import BRConfigTest
import infra
def main():
parser = argparse.ArgumentParser(description='Run Buildroot tests')
@ -23,6 +25,8 @@ def main():
help='output directory')
parser.add_argument('-d', '--download',
help='download directory')
parser.add_argument('-p', '--prepare-only', action='store_true',
help='download emulator builtin binaries')
parser.add_argument('-k', '--keep',
help='keep build directories',
action='store_true')
@ -60,6 +64,16 @@ def main():
BRConfigTest.downloaddir = os.path.abspath(args.download)
if args.prepare_only:
emulator_builtin_binaries = ["kernel-vexpress-5.10.7",
"vexpress-v2p-ca9-5.10.7.dtb",
"kernel-versatile-5.10.7",
"versatile-pb-5.10.7.dtb"]
print("Downloading emulator builtin binaries")
for binary in emulator_builtin_binaries:
infra.download(BRConfigTest.downloaddir, binary)
return 0
if args.output is None:
print("Missing output directory, please use -o/--output")
print("")