From 873306199e55a9cfd5bd64c8ad9b526cf25a1466 Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Mon, 17 Jul 2023 23:33:57 +0200 Subject: [PATCH] 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 Signed-off-by: Thomas Petazzoni --- support/testing/run-tests | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/support/testing/run-tests b/support/testing/run-tests index bf40019362..e8c540f370 100755 --- a/support/testing/run-tests +++ b/support/testing/run-tests @@ -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("")